+ 2
We all float down here. CSS
So I can’t really get my assignment to float but the format seems correct, any help? Ex. Nav.horizontalNavigation li{ Display: block; Float:left; } What am I missing?
4 Respostas
+ 1
Can you post a code with an example? It's hard to figure out what's wrong in only four lines of CSS and no HTML...
0
/* Body Styles */
body {
margin-left: auto;
margin-right: auto;
max-width: 960px;
min-width:640px;
width: 95%;
}
/* Body Header Styles */
body > header > img{
display:block;
width:100%;
}
body > header > nav.horizontalNavigation li {
width:20%;
}
/* Horizontal Navigation Styles */
nav.horizontalNavigation li {
display:block;
float:left;
}
nav horizontalNavigation a{
display: block;
text-align: center;
}
0
I can only guess since I don't have the whole code...
Probably your floating elements should be inline or inline-block. Also it's very uncommon to let navigation elements float. There's probably a better solution for this problem than floating elements.
0
see thats what i figured but I have to follow the book directions and try my own add-ons as i go.