user3092120
user3092120

Reputation: 1

CSS Navigation bar full size

so I am running WordPress, with a premium theme.

I wish to change the navigation bar size, and so I added

li
{
float:left;
}
a
{
display:block;
width:60px;
}

When I add this, the navigation bar changes size, and becomes as I want to. HOWEVER, also the posttitles changes layout, and becomes really ugly.

I am looking for some input

Upvotes: 0

Views: 104

Answers (2)

ChrisHero
ChrisHero

Reputation: 11

If you're targeting li elements globally, it may be affecting more than just the nav area. Try adding more specificity to your rule.

i.e. ".nav li" (.nav being whatever the class or id of your nav is) instead of just "li"

Upvotes: 1

Jeribo
Jeribo

Reputation: 465

sounds like float is affecting other elements. Using clear:both should fix this.

<ul>
 <li>....</li>
</ul>
<div class="clearfix"></div>

and .css

.clearfix{
    clear:both;
}

Upvotes: 0

Related Questions