how to control the sequence when float anchor list

 



concept: float the name to left; float the anchor list to right.

problem: after float the anchor list to right, the sequence changed into: contact-portfolio-home.


1. html:

<h3>William Ma</h3>
<ul class="footer-nav">
<li ><a href="#">home</a></li>
<li><a href="portfolio/index.html">portfolio</a></li>
<li><a href="portfolio/articles/contact/contact.html">contact</a></li>
</ul>

2. float name to left

h3 {
display:block;
float:left;
}

3. float nav to right

.footer-nav {
float:right;
}

4. float list to left

.footer-nav li {
display:inline-block;
float:left;
}














Comments

Popular posts from this blog

how to code a weather forecast web

What Build Tools Do JavaScript Developers Use?

WordPress Theme Development From Scratch - 3. Enqueuing CSS and JS to W...

how to use :focus

unit3.online registration form tricks: input field box align right and placeholder text right, but input text left.

how to screenshot a drop down menu on mac

Numbers in JavaScript introduction