Stretching Horizontal Navigation Menus

[ this selector could be div#nav instead of nav depending on which tag you wrapped the ul in ]
html:

<nav>
	<ul>
		<li><a href="">Home Page</a></li>
		<li><a href="">About Us</a></li>
		<li><a href="">Contact Us</a></li>
	</ul>
</nav>

css:

nav{display: table;width: 100%;border-collapse: collapse;border: none;}
nav ul {display: table-row;}
nav li {display: table-cell;margin: 0;}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s