tags:

views:

34

answers:

2

See this page i'm currently working on. http://lacrosselaundry.com/lacrosseLaundry/contact.php

If i change the font-size for 6 from 14px to 18px it moves the form to the right. Why is that?

I want the form to be all the way over to the right like when the h6 font is 18px, except i want the h6 font to be 14 px. How do I fix this and why is it happening?

+2  A: 

How about setting element sizes? Works for me in firebug.

#main {
    width: 100%;
}
.clearLeft {
    width: 300px;
}

As for reasons, .rightDiv moves (despite having align: right) because parent container (#main) width increase. I.e., you increase font size and container stretches to accomodate changes. Normally divs take up all available width, but having float: left overrides that.

Nikita Rybak
I didn't need to specifically set a width to clearLeft, just setting the #main width to 100% worked. Thanks.
Catfish
+1  A: 

You can try to set the width of #main to 100%, so the #main .rigthDiv element would truly float to the right.

William