Evenly space links in div
Tag : html , By : vferman
Date : March 29 2020, 07:55 AM
|
Evenly spread links over a horizontal navigation
Tag : html , By : PsyberMonkey
Date : March 29 2020, 07:55 AM
hope this fix your issue Use display: table for UL and display: table-cell for LI. And display-table.htc for IE6/7 if they matter.
|
Evenly space out horz links and bullets between links across nav bar
Tag : html , By : user96271
Date : March 29 2020, 07:55 AM
With these it helps Let's clean up some of that HTML and CSS :) We can create the bullets using just the li parents for each link. The padding on #container li will space out the bullets evenly, however large of a gap you want. <div id="container">
<ul>
<li>
<a href="%3C%=BaseURL%%3E/entertainment">ARTS & ENTERTAINMENT</a>
</li>
<li>
<a href="%3C%=BaseURL%%3E/technology">TECHNOLOGY</a>
</li>
<li>
<a href="%3C%=BaseURL%%3E/auto">AUTO</a>
</li>
<li>
<a href="%3C%=BaseURL%%3E/sports">SPORTS</a>
</li>
<li>
<a href="%3C%=BaseURL%%3E/news/more-news-briefs.asp">NEWS BRIEFS</a>
</li>
<li>
<a href="%3C%=BaseURL%%3E/greentech">GREEN ECONOMY</a>
</li>
<li>
<a href="http://www.hirediversity.com" rel="nofollow" target="_blank">CAREER NEWS</a>
</li>
</ul>
</div>
* {
margin: 0;
padding: 0;
}
#container {
overflow: hidden;
}
#container ul {
margin: 10px auto;
width: 776px;
border-bottom: dotted 1px #CCC;
overflow: auto;
padding: 0 0 10px;
}
#container li:first-child {
list-style: none;
margin: 0 0 0 18px;
}
#container li {
float: left;
font-family:"Arial Narrow", Arial, sans-serif;
font-size: 0.8em;
padding: 0 30px 0 2px;
}
#container a:link {
color: #000;
text-decoration: none;
}
#container a:hover {
color: #F00;
text-decoration: underline;
}
|
Evenly space out links and centered logo in navigation bar
Tag : html , By : Stephen
Date : March 29 2020, 07:55 AM
To fix this issue I'm attempting to evenly space out links in a nav bar to the left and right of a centered logo, similar to this (link). , Encase each navBar section (including the image) in it's own div. <div class="navSection>Section 1</div>
<div class="navSection>Section 2</div>
<div class="navSection>Image</div>
<div class="navSection>Section 4</div>
<div class="navSection>Section 5</div>
.navSection {
float: left;
width: 20%;
}
|
Trying to evenly space out an image nav link with the rest of the text links in navigation
Tag : html , By : Cube_Zombie
Date : March 29 2020, 07:55 AM
Hope that helps I'm trying to make my first website after reading an html/css book. I'm having difficulty evenly spacing out my navigation. .nav {
background: tomato;
padding: 25px;
display: flex;
list-style: none;
flex-direction: row;
/* vertical alignement */
align-items: center;
/* how you want horizontal distribution */
/* space-evenly | space-around | space-between */
justify-content: space-evenly;
}
.item {
background: rgba(0, 0, 0, 0.2);
}
.item:first-child {
height: 50px;
line-height: 50px;
}
<ul class="nav">
<li class="item">navA</li>
<li class="item">navB</li>
<li class="item">my third item</li>
<li class="item">Blah</li>
<li class="item">Contact</li>
</ul>
nav > ul {
background: tomato;
padding: 25px;
display: flex;
list-style: none;
flex-direction: row;
/* vertical alignement */
align-items: center;
/* how you want horizontal distribution */
/* space-evenly | space-around | space-between */
justify-content: space-evenly;
}
|