Andrea Posted February 12, 2009 Report Posted February 12, 2009 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
Wickham Posted February 12, 2009 Report Posted February 12, 2009 (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 February 12, 2009 by Wickham
Andrea Posted February 12, 2009 Author Report Posted February 12, 2009 float: none - Yup, I knew it'd be easy....
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now