YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  opensource  webdesign  permalink:  85   posted on 12.05.2011 5:14
From Yorik

Handheld version

This site now has a special display mode when viewed with a handheld device. It is pretty simple to achieve, it is all made with CSS and works the same way as for printing: You just define new rules inside a "@media handheld { }" declaration. Your handheld browser will do the rest. The best way is to define a set of classes for your "main" screen mode, then overclass some of them inside the handheld (and print) section(s), like this for example:

.myDiv {
    background: black;
    color: white;
    width: 800px;
    }
@media handheld {
    .myDiv {
        width: auto;
        }
    }

The myDiv class will appear white on black in both cases, but on normal screen it will have a width of 800 pixels while on handhelds it will have an automatic width.

First and foremost, your name:

And your message:

To publish it, just press this ...