CSS Right float issue |
[eluser]Yash[/eluser]
Hi, I've created a template in which I set right div as float:right now problem is if main div(on left hand size) is small then this right one starts floating on footer and on base...looks very ugly. footer is just down of main. looks ok if size of left is greater than right.complex?may be... How can I resolve this issue?
[eluser]mdowns[/eluser]
It's hard to say without seeing the markup, but it sounds like you need to give the main div an explicit width and/or float:left.
[eluser]Matthew Lanham[/eluser]
Floating css is a bit of a paid, i'd suggest you have a look at a CSS framework, cuts down alot of crap i've been using BlueprintCSS: http://code.google.com/p/blueprintcss/
[eluser]Bramme[/eluser]
Don't forget to clear your floats That's probably the problem...
[eluser]Yash[/eluser]
what is that clear and how to use that? I can Google it but want to know developer view
[eluser]Bramme[/eluser]
when you float block elements other elements can't know the height of them. For instance, if you have a div containing two other divs, one floated left and the other right, the containing div will never span those two divs unless you clear them... Lemme set up a quick example: http://bramme.net/uploads/float.htm |
Welcome Guest, Not a member yet? Register Sign In |