html - Putting Text Into A Div -


I have this code that I am using to create a navigation bar and a site title.

  & lt; Div id = "wrap" & gt; & Lt; Ul id = "nav" & gt; & Lt; Div id = "head" & gt; & Lt; Li & gt; & Lt; A href = "transitionyear.html" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Ti Projects & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; News & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Build Bank & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Enterprise Awards & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Gece & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Social Inclusion & lt; / A & gt; & Lt; / Li & gt; & Lt; / Div & gt; & Lt; / Ul & gt;  

#nav {width: 100%; Swim left; Margin: 0 0 3em 0; Padding: 0; List style: none; Background color: # F2F2F2; Border bottom: 1px solid # ccc; Border-top: 1px solid # ccc; } # Nav li {float: left; } # Nav li a {display: block; Padding: 8px 15px; Text-decoration: None; font-weight: bold; Color: # 06 9; Border-right: 1px solid #ccc; } #Nav Li A: Hover {Color: # C 00; Background color: #fff; } #wap {width: 750px; Margin: 0 auto; Background color: #fff; } # Head {width: 100%; Margin-top: 30px; Background color: #fff; Limit: 1px solid # ccc; }

I can not get the text in the top of the text (top div). I want to add "Marist College Transition Year" above the navigation bar.

As a start, set HTML correctly, maybe something like the following.

Your li must be nested in the ul element.

# nav {width: 100%; Swim left; Margin: 0 0 3em 0; Padding: 0; List style: none; Background color: # F2F2F2; Border bottom: 1px solid # ccc; Border-top: 1px solid # ccc; } # Nav li {float: left; } # Nav li a {display: block; Padding: 8px 15px; Text-decoration: None; font-weight: bold; Color: # 06 9; Border-right: 1px solid #ccc; } #Nav Li A: Hover {Color: # C 00; Background color: #fff; } #wap {width: 750px; Margin: 0 auto; Background color: #fff; Overflow: Auto; / * To prevent float from interfering with the remaining layout * / #head {width: 100%; Margin-top: 30px; Background color: #fff; Limit: 1px solid # ccc; }
  & lt; Div id = "wrap" & gt; & Lt; Div id = "head" & gt; & Lt; H2 & gt; Marist College transition year & lt; / H2 & gt; & Lt; / Div & gt; & Lt; Ul id = "nav" & gt; & Lt; Li & gt; & Lt; A href = "transitionyear.html" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Ti Projects & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; News & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Build Bank & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Enterprise Awards & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Gece & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Social Inclusion & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Algorithm negotiation fail SSH in Jenkins -

java - Messages from .properties file do not display UTF-8 characters -