Help with "float" in CSS |
Help with "float" in CSS |
ChrnoLove |
Apr 1 2010, 01:43 AM
Post
#1
|
Group: Members Posts: 4 Joined: 1-April 10 Member No.: 11,547 |
Hi all, im Chrno
I have a problem with using float I have a simple page using div with float like this Untitled_1.html ( 1.15k ) Number of downloads: 560 Here is the code CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> #bd{width:1260px;margin:0 auto;} .item{ height:190px; width:190px; margin:10px;background-color:#C0C; z-index:999;position:relative;} .bigitem{ height:400px; width:400px; margin:10px;background-color:#C93; z-index:2;} .floatleft{float:left;} .floatright{float:right;} </style> </head> <body> <div id="bd"> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="bigitem floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="bigitem floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> <div class="item floatleft"></div> </div> </body> </html> Can any1 give idea how to fill all the blank area? Thanks in advance |
pandy |
Apr 1 2010, 03:57 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Which one?
|
ChrnoLove |
Apr 1 2010, 04:15 AM
Post
#3
|
Group: Members Posts: 4 Joined: 1-April 10 Member No.: 11,547 |
Plzzz open the html file i attached together in this topic, you'll see, im now planning to make some div with others width and height and i want to sort them, and fill them full in a "bd" div...
I dunno how to explain it but... you'll see in html file, there some blank space and i want to fill them with the divs around |
pandy |
Apr 1 2010, 04:23 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I did look at the page. I don't know what space you want to get rid of.
|
ChrnoLove |
Apr 1 2010, 09:05 PM
Post
#5
|
Group: Members Posts: 4 Joined: 1-April 10 Member No.: 11,547 |
|
Darin McGrew |
Apr 2 2010, 12:48 AM
Post
#6
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I don't see any way to do it without adding container elements of some sort.
|
ChrnoLove |
Apr 12 2010, 09:58 PM
Post
#7
|
Group: Members Posts: 4 Joined: 1-April 10 Member No.: 11,547 |
Can you make it simply to imagine plzzzz???
|
Darin McGrew |
Apr 13 2010, 12:02 AM
Post
#8
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I don't think there is a simple way to do it without tables, just using CSS. With that complex a structure, I'd use a table with COLSPAN and ROWSPAN to create the structure.
|
Lo-Fi Version | Time is now: 18th April 2024 - 04:05 PM |