![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
the problem i am trying to solve is... without using table, i was thinking of just arranging several 100px width and height boxes in one row, and each containing a 75 x 75 image inside... |
#2
| |||
| |||
|
|
In article 1193367956.785197.4... (AT) y27g2000pre (DOT) googlegroups.com>, Summercool <Summercooln... (AT) gmail (DOT) com> wrote: the problem i am trying to solve is... without using table, i was thinking of just arranging several 100px width and height boxes in one row, and each containing a 75 x 75 image inside... So why not do just this? Put in a proper Strict doctype, and css would be something like .wrapper div {float: left; width:100px; height: 100px;} while in the body of the html you might have something like: div class="wrapper" div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div ..... /div The wrapper helps to avoid classing each div, and for some other things which I will leave out for now. It may not be necessary, depending on your needs. You can add margins and padding and border to suit your purposes. |
#3
| |||
| |||
|
|
On Oct 25, 8:19 pm, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: In article 1193367956.785197.4... (AT) y27g2000pre (DOT) googlegroups.com>, Summercool <Summercooln... (AT) gmail (DOT) com> wrote: the problem i am trying to solve is... without using table, i was thinking of just arranging several 100px width and height boxes in one row, and each containing a 75 x 75 image inside... So why not do just this? Put in a proper Strict doctype, and css would be something like .wrapper div {float: left; width:100px; height: 100px;} while in the body of the html you might have something like: div class="wrapper" div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div div><img src="..." height="75" width="75" alt="..."></div ..... /div The wrapper helps to avoid classing each div, and for some other things which I will leave out for now. It may not be necessary, depending on your needs. You can add margins and padding and border to suit your purposes. that looks nice. without needing to class or style each div inside the wrapper. |
|
now if i am to create another row, then i actually need to have a div style="clear:both"> </div |
|
and then start another row huh? actually, won't this last div also inherit the "float: left" as well? will the "clear: both" be kind of depending on the float defined some where else... so you kind of have to remember the coupling... (change one place (.css file), need to change the other (.html file)... but i like your solution with the wrapper nonetheless. |
![]() |
| Thread Tools | |
| Display Modes | |
| |