Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

59 users online



CSS DIV problem in FF

CSS DIV problem in FF

Currently viewing this thread: 1 (0 members and 1 guests)


Chrome54

Chrome54

Foolish Mortal
Status: Offline!

CSS DIV problem in FF

I'm relatively new to the concept of using all DIVs in webpages, having been a lover of tables in the past, and I'm having one very annoying problem with them in Firefox. One DIV nested inside another will not force the DIV it is contained in to stretch with it, while it does stretch in Internet Explorer.

The site is http://www.robmura.com

coolaid

coolaid

Oh Yeaa.
Status: Offline!

add this in the css:

Code:

.clear{
  clear: both;
}

now add this div everytime you just finished using floating divs:

Code:

<div class="clear"></div>

___________________

scudworkz.com.

Chrome54

Chrome54

Foolish Mortal
Status: Offline!

Worked like a charm. Much thanks, good sir.

the_bass_man

the_bass_man

Neverside Newbie
Status: Offline!

This is exactly the same probelm I have been trying to fix for 30mins and it worked fine Grin

Can anyone give a simple explaination of exactly what it is doing as I dont like adding code without know how it works :P

Thanks alot coolaid

coolaid

coolaid

Oh Yeaa.
Status: Offline!

no problem Wink

when you float something, that means it's containging divs aren't really containers. imagin the container being on layer 1 and the other divs on layer2. now imagin that layer 1 doesn't expand unless its got content in it. well, layer 2 isn't part of it unless you clear it, which makes the div (layer 1) stretch down below the other divs (layer 2)

i like to think of them as layers case you're basically floating them.

___________________

scudworkz.com.

sparky

sparky

I need a haircut
Status: Offline!

A terrible analogy that just popped in my head.

You're in a movie theater, and you're saving spots for a couple friends (say one on each side). What you specify for clear is somewhat analogous to where you put your coat to save them seats.

For example. If you've got a jacket in the seats on either side then you're NOT allowing anybody else (a la, floated elements in the web design world) to crowd on either side of you. Accordingly, clear: both; says nothing's allowed on either side of that element, and will scoot down until that is true.

But you can also specify left, right, and none (default) to let some or both of your friends fend for themselves.

That help any? Should I shutup now? Grin

___________________

Jon Culver Chia Pets

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0078 seconds.