Welcome Guest, Not a member yet? Register   Sign In
CSS Right float issue
#1

[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?
#2

[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.
#3

[eluser]Yash[/eluser]
I use table instead of two div anyways thanx
#4

[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 Smile i've been using BlueprintCSS:

http://code.google.com/p/blueprintcss/
#5

[eluser]shaffick[/eluser]
Try www.pmob.co.uk

A lot of css bases you can reuse.
#6

[eluser]Yash[/eluser]
Thank you guys for your suggestion. I'll try these.
#7

[eluser]Bramme[/eluser]
Don't forget to clear your floats Wink

That's probably the problem...
#8

[eluser]Yash[/eluser]
what is that clear and how to use that? I can Google it but want to know developer view
#9

[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




Theme © iAndrew 2016 - Forum software by © MyBB