Graphics Programs Reference
In-Depth Information
h e advantage of this approach is that if you have these styles in place at the point when you
decide you can convert to HTML 5, then all you need to do is change your markup to use
HTML 5 elements instead of classed div s and then strip of the periods to turn the class
selectors into element selectors. h at's it. Easy as cake!
MEDIA QUERIES
h is could honestly be its own chapter, or possibly even its own topic. h us, what follows will
necessarily be just a brief taste of the possibilities. You should dei nitely follow up with more
research, because in a lot of ways this is the future of Web styling.
h e point of media queries is to set up conditional blocks of styles that will apply in dif erent
media environments. For example, you could write one set of styles for portrait displays and
another for landscape displays. You might change the colors based on the bit depth of the
display. You could change the font based on the pixel density of display. You might even
rearrange the page's layout (see Figure 7-3) depending on the width or number of pixels
available in the display.
235
Figure 7-3: A basic three-column layout.
 
Search WWH ::




Custom Search