|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
2008-10-09, 12:11 PM | #3 | |
If something's hard to do, then it's not worth doing
Join Date: Sep 2008
Location: Berlin, Germany
Posts: 247
|
Quote:
There is also some speculation that sites using xhtml strict get a slightly higher ranking off search engines but I'm still calling bunk on that one. Anyway, using tables for layout at this point in time is also not in your best interest due to the way tables are often rendered (slowly), and nested tables can seriously hang a browser for a few seconds which means that the surfer might just close the window and go "eh fuck it". So, say, you have a table layout for galleries, 5 columns, 4 rows for a total of 20 pics. To put that in xhtml strict, first we need some styles: Code:
#gallery { width: 800px; margin: 0px; padding: 0px; } #gallery div.row { clear: both; } #gallery div.image { width: 150px; padding: 10px; float: left; position: relative; } #gallery div.image img { border: 0; } .clear { clear: both; } Code:
<div id="gallery"> <div id="row1" class="row"> <div id="image1" class="image"> <a href="/image.jpg"><img src="/image_thumb.jpg" /></a> </div> . . . . </div> <div id="row2" class="row"> . . . . . </div> </div> Caveat: It should look the same as your table layout but I'm doing this from memory so it might not look right Last edited by MadCat; 2008-10-09 at 12:13 PM.. Reason: eye kin speelz rite! |
|
|
|