24. Floating right along bug


#1


24. Floating Right Along

Error: Oops, try again. Did you set your #footer to clear:both?

The Instructions:

Inside the #left selector, set float: left and width: 45%

Inside the #right selector, set float: right and width: 45%

Inside the #footer selector, set clear: both

I kept getting an error saying that I hadn't set #footer to clear:both, although in the code I did exactly what it told me. I double checked multiple times and I am certain the code was correct. The way that I solved this was to change #footer to a class in the html and css tab.


#left{
    float: left;
    width: 45%;

#right{
    float: right;
    width: 45%; 

#footer {
	position: relative;
	bottom: -20px;
	border-bottom-left-radius: 15px;
	border-bottom-right-radius: 15px;
	height: 75px;
	background-color: #3c4543;
	clear: both;
}


Code after changing the id to class

CSS

.footer {
	position: relative;
	bottom: -20px;
	border-bottom-left-radius: 15px;
	border-bottom-right-radius: 15px;
	height: 75px;
	background-color: #3c4543;
	clear: both;
}

HTML

		<div class="footer">
			<div id="button">
				<p>Send me an <span class="bold">e-mail</span>!</p>
			</div>
		</div>


#2

#left{
    float: left;
    width: 45%;
// missing }
#right{
    float: right;
    width: 45%; 
// missing }

you miss curly closing brackets to close the css selector, this will give an error


#3

I have tried adding in those curly brackets and it still does not work. Thanks for the help though!


#4

please post your html, css code and exercise url


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.