![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Tony T wrote on 17 aug 2003 in comp.infosystems.www.authoring.stylesheets: Is there any way other than using absolute or relative positioning (or tables) for each image that will reliably render a grid of images without any gaps on all - or at least most - browsers and platforms? What about float and clear in css ? |
#2
| |||
| |||
|
|
.grid img { float:left; border: 0px; padding: 0px; margin :0px; } /style base href="http://rnetworks2002.users.btopenworld.com/csstest/" /head><body div class="grid" img src="red.gif" width=100 height=100 alt="red" img src="green.gif" width=100 height=100 alt="green" br style="clear:left;" img src="blue.gif" width=100 height=100 alt="blue" img src="yellow.gif" width=100 height=100 alt="yellow" br style="clear:left;" /div |
#3
| |||
| |||
|
|
div class="grid" img src="red.gif" width=100 height=100 alt="red" img src="green.gif" width=100 height=100 alt="green" br style="clear:left;" img src="blue.gif" width=100 height=100 alt="blue" img src="yellow.gif" width=100 height=100 alt="yellow" br style="clear:left;" /div Yes, this does it better - see http://rnetworks2002.users.btopenwor...est/grid2.html NN4.5 loses two of the squares, but I can live with a workaround for NN4 if I have to. |
#4
| |||
| |||
|
|
"Evertjan." <exjxw.hannivoort (AT) interxnl (DOT) net> wrote in message news:Xns93DA98F90F376eejj99 (AT) 194 (DOT) 109.133.29... snip Evertjan's solution>.... http://rnetworks2002.users.btopenwor...est/grid2.html NN4.5 loses two of the squares, but I can live with a workaround for NN4 if I have to. |

#5
| |||
| |||
|
#6
| |||
| |||
|
|
I had a brainwave .... here's the original but with the img {margin} set to img {margin: -2px;} http://rnetworks2002.users.btopenwor...negmargin.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |