-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 12: the selected area goes beyond the navigation bar #14
Comments
Hi, I'd have to see the rest of the css. It could be you've got too much padding on the li? E.g. the rule below specifies the padding: nav ul li { And all of it is dependent on the sizes (width, height, padding, margin) on all the rest of the elements in the header as well. So double check all of those measurements in your CSS. |
@bethrobson May I ask you to take a look at the final codes (HTML&CSS), please:
CSS: header.top { header.top img#headerSlogan /* You could also just use #headerSlogan here as the selector if you want */{ #tableContainer { #tableRow { section#drinks { section#blog, section#main{ aside { footer { h1 { .slogan { color: #954b4b; } .beanheading { a:link { a:visited { nav { nav ul { nav ul li { nav ul li a:link, nav ul li a:visited { nav ul li.selected { |
In the rule: nav ul { you have an extra space between 0 and px. It should look like this: nav ul { |
@bethrobson Thank you very much for your advice! |
I set 0px for padding in nav ul li.selected and the selected fits exactly the height of the nav bar: I got it accidentally, @bethrobson could you explain me in detail please how it works? |
Hello everyone!
I finished Chapter 12 of HeadFirst HTML/CSS. Everything is clear except one minor thing.
The selected area goes beyond the navigation bar. How to make the selected area fit exactly the navigation bar? Please, could you help me?
Have a nice day! Many thanks in advance!
Here’s the screenshot:
Here's the CSS code for the selected area:
nav ul li.selected {
background-color: #c8b99c;
}
The text was updated successfully, but these errors were encountered: