Step 5: layout and performance of additional structures outside the main webpage frameworks

Source: Internet
Author: User

Step 5 describes the Layout structure, including the following:
1. Main navigation bar;
2. heading, including the website name and content title;
3. Content;
4. Footer information, including copyright, authentication, and secondary navigation bar (optional ).

When adding these structures, in order not to break the original framework, we need to add them under the "body" TAG of the css file:

. Hidden {
Display: none;
}

". Hidden" is the class we add. This class will not display any element of the hidden class on the page. These will be used later. Please forget them now.

Now we add the title (heading ):
First, return to the HTML code.

<Div id = "header">
<H1> Enlighten Designs
</Div>

Refresh the page and you will see a huge title and blank spaces around the title, which is caused by the default size and margin of the

H1 {
Margin: 0;
Padding: 0;
}

Next is the navigation bar:
The css code used to control the navigation bar is relatively complicated. We will introduce it in detail in Step 9 or step 10. Add the following navigation code to the html file:

<Div id = "main-nav">
<Ul>
<Li id = "about"> <a href = "http://css.jorux.com/wp-admin/post.php#"> About </a> </li>
<Li id = "services"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Services </a> </li>
<Li id = "portfolio"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Portfolio </a> </li>
<Li id = "contact"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Contact Us </a> </li>
</Ul>
</Div>

(Note: The Original tutorial uses dl and dt, where jorux uses more frequently-used ul and li tags)
Currently, the navigation bar has poor performance. However, to introduce its special performance in future tutorials, you need to temporarily hide the navigation bar. Therefore, add:

<Div id = "main-nav">
<Dl class = "hidden">
<Dt id = "about"> <a href = "http://css.jorux.com/wp-admin/post.php#"> About </a> </dt>
<Dt id = "services"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Services </a> </dt>
<Dt id = "portfolio"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Portfolio </a> </dt>
<Dt id = "contact"> <a href = "http://css.jorux.com/wp-admin/post.php#"> Contact Us </a> </dt>
</Dl>
</Div>

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.