Centering navigation links
I'm using wordpress to host a website for work, and I was finally able to change the name of the site to an image.. But now it looks all weird because the navigation links are still aligned to the left. I'm trying to center them on the page, but I can't find the code to change. The navi links on the blue line are categories, and when I cntrl-F to find categories, only 2 lines show up, & they are just for hiding all the links.
I was wondering if there was a piece of code I should be looking for or if this info is included in the stylesheet & not editable.
Thanks for any help! Also, here's the tester website for ref: http://phitlab.host22.com/wordpress/
Edit: Found the html/ css code that needs editing
<div id="cat-nav" class="clear">
<ul class="nav sf-js-enabled">
<li class="cat-item cat-item-3">
<a title="View all posts filed under Home" href="http://phitlab.host22.com/
wordpress/?cat=3">Home</a>
</li>
<li class="cat-item cat-item-4">
<a title="View all posts filed under People" href="http://phitlab.host22.com/
wordpress/?cat=4">People</a>
</li>
<li class="cat-item cat-item-5">
<a title="View all posts filed under Publications" href="http://phitlab.host22.com/
wordpress/?cat=5">Publications</a>
</li>
<li class="cat-item cat-item-7">
<a title="View all posts filed under Research" href="http://phitlab.h开发者_开发知识库ost22.com/wordpress/?cat=7">Research</a>
</li>
<li class="cat-item cat-item-6">
<a title="View all posts filed under zContact" href="http://phitlab.host22.com/wordpress /?cat=6">zContact</a>
</li>
</ul>
</div>
</div>
I would look at the HTML source code to check to see if the elements have any classes or ids. If they don't then I would check their parents for classes and ids as well.
Then search the css code for the these classes and ids to find its source code.
Both of these tasks will be easier if you use a browser extension or feature. I like firebug for firefox or ctrl-shift-i in chrome. They can tell you how the styles are decided for each element and what line of the css file to find it.
If what you want to do is center them it probably would be easiest to give the container element that holds your navigation links a fixed width using px or % then set
margin-left:auto;
margin-right:auto;
精彩评论