The content of the <title>
tag canāt be shown on the page itself, it is only shown in the title bar at the top of the browser window. Thatās why the <title>
you have in there right now isnāt showing on the page. Itās not doing anything really. It is basically being thrown away by the browser.
It sounds like you want to put a heading above the nav links? So you could just change that to an <h2>
but Iām not sure the heading āDOCā really makes sense here. A heading for this nav menu might be something like āTable of Contentsā. It should describe the content that follows.
I have changed some details in CSS and now āTable of Contentā is apparent in my page, however it is not aligned with the navbar content.
Let me ask you this. What is the reason for the padding you have on the <header>
?
Also, generally you would have the <nav>
inside the <header>
, not the other way around.
See my comments in the other thread you started about this:
Hello afaelleduarte1993,
You have wrapped the header tag around the h2 tag which has very high padding.
header{
padding: 20px 200px 7px 320px;
}
Removing it will fix it to some extent.
Thank you.
Is there another way to fix the problem without changing code? Removing the padding culminates in the content of the page being partially hidden by the navbar.
You donāt have to remove the padding. What I would do is, remove the header wrapped around āh2ā tag (see line 7 in your html).
Turn
<header><h2>Table of Content</h2></header>
to
<h2>Table of Content</h2>
Whenever I do what you have mentioned, the test bar states: " The navbar element should contain one āheader element which contains text that describes the topic of the technical documentationā.
Ok understood. maybe you can alter the padding then.
You can add a new class to h2 similar to
<header class='padding'><h2>Table of Content</h2></header>
and target the class in css using the below style:
.padding {
padding:0;
}
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.