Forum Moderators: not2easy

Message Too Old, No Replies

CSS issue grid-like issue

Help needed :o

         

Garfie

7:03 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



I am trying to do something that can easily be accomplished by tables.. it should kind of look like this:


------------------------------------------------
¦ --------- ¦ --------- ¦ -------- ¦ --------- ¦
¦ ¦..pic..¦ ¦ ¦.pic...¦ ¦ ¦.pic..¦ ¦ ¦.pic...¦ ¦
¦ --------- ¦ --------- ¦ -------- ¦ --------- ¦
¦ aadsdasds ¦ aadsdasds ¦ aadsasds ¦ aadsdsds .¦
------------------------------------------------
¦ --------- ¦ --------- ¦ -------- ¦ --------- ¦
¦ ¦.pic...¦ ¦ ¦pic....¦ ¦ ¦.pic..¦ ¦ ¦.pic...¦ ¦
¦ --------- ¦ --------- ¦ -------- ¦ --------- ¦
¦ aadsdasds ¦ aadsdasds ¦ aadsasds ¦ aadsdsds .¦
------------------------------------------------

Each container of text and picture should be a div or a span and should be a fixed width. When a container can not fit on that line it should be pixed to the next, and it should add rows as needed.

Hope that makes sense.. heh

edit: that drawing is kind of screwed.. look at it in a monospace font for clarification :O
TIA
-Garfie

[edited by: SuzyUK at 7:25 pm (utc) on Oct. 17, 2004]
[edit reason] tried to fix ASCII [/edit]

Robin_reala

10:19 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Pretty easy for a basic layout like the one you want. For example, say you've got 8 blocks. The HTML would be:

<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>
<div><!-- content --></div>

and the style:

div{
float: left;
}

I hope I'm intepreting what you want correctly.

ronin

11:33 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's probably a good idea to specify the width as well.

photon

11:35 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not just a good idea--it's required for floats.