Jump to content

Recommended Posts

Posted

Inside a wrapper, I have a left-float and a right-float division.

#left {float: left;}

#right {float: right;}

On one of the pages, I don't have the left div, and want the right div to take over the entire wrapper width - so if I were to use
in my HTML, what do I need to add to my CSS to make it so?
#left {float: left;}

#right {float: right;}

#right.entire {???;}

 

I bypassed the problem by just changing the div id on that page to a new name - but surely, there is a better way.... I imagine it's so easy, I'll feel stupid for having asked :o

Posted (edited)

#right.entire {float: right; width: 100%;}

 

and possibly a clear: both; in a following div.

 

Another option: Since it is now the only div, you probably don't need the float; so delete the #left div and create

 

#right.entire {width: 100%; float: none;}

 

And/Or leave the left div there in case you need it later;

#left.none {float: left; width: 0; display: none;}

Edited by Wickham

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...