+ 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?

18th Sep 2019, 7:07 AM
Angela Jicole
Angela Jicole - avatar
4 Antworten
+ 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...
18th Sep 2019, 7:20 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
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; }
18th Sep 2019, 1:13 PM
Angela Jicole
Angela Jicole - avatar
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.
18th Sep 2019, 3:52 PM
Aaron Eberhardt
Aaron Eberhardt - avatar
0
see thats what i figured but I have to follow the book directions and try my own add-ons as i go.
18th Sep 2019, 4:13 PM
Angela Jicole
Angela Jicole - avatar