PDA

View Full Version : CSS: Element behaving differently when definition moved?


Keleth
06-23-2008, 06:44 AM
So I have an interesting problem I can't figure out, was hoping someone might have an idea.

I made a "div table" using floating divs wrapped in a larger div. Nothing fancy.

Its setup so the wrapper div has the class "divTr", and makes all child div's floating left. I then assigned the last div in the block a class "noFloat". When I define no float to have "float: none" in a style definition in the header, the div moves around, as if it were not in the wrapper div. When I move the "float: none" definition inline to the style attribute of the div, it works perfectly. I can't figure out why it won't work in the header, but works in the style attribute...

Burr
06-23-2008, 07:25 AM
I'm not sure I fully understand what you're asking, but you could using 'clear: both;' in the div right after the header, or whenever you want to create a 'new line'.

abduraooft
06-23-2008, 08:19 AM
Keleth, could you post a link to your page? Or the complete code of your document?

Keleth
06-23-2008, 04:35 PM
I guess I was avoiding a "clear: both" as I plan on adding a submenu on the left by floating a div.

http://pnpo.roguemediapro.com/register/register.php contains the float in the head defined class, and doesn't appear correctly.

http://pnpo.roguemediapro.com/register/register2.php contains the float in the style attribute of the two divs containing the "ruleDesc" class.

Thoughts are appreciated.

Keleth
06-23-2008, 09:16 PM
Ok, I tried it with clear: both and i still get the same behavior as the first link, only it instead now spaces out the top 3 divs far apart.