Jump to content
Sign in to follow this  
brightideas

How do you get rid of the right and left margins on the Primary Navigation Bar?

Recommended Posts

brightideas

This is driving me up a wall and I have spent the last two hours searching for a solution on the forums before asking this. The main navigation bar on this site is not going all the way across the page area and leaving unsightly gaps to the right and left. I have used this bit of code and it doesn't do anything at all:

#primary-nav .content {margin: 0px; padding: 0px;}

Can someone tell me what exactly controls the width, padding, margins of this area? I am currently using the Pageline Customize plug-in to control all my customizations. Thanks!

Share this post


Link to post
Share on other sites
Rob
First, a helpful hint: in CSS, when using Zero (0) for pixels as a whole number, you don't need to add "px" after it. You have:[code] .main_nav_container { float: left; margin-right: -230px; width: 100%; }[/code] Use of a negative number is often a bad thing in WordPress. Additionally, it is causing the menu to actually bleed over the edge of the page. You should remove the margin-right: -230px; line entirely as it's moot. If you have Firebug, you should be able to find the correct CSS elements to apply a background color to the entire nav area. There is a one pixel border under the nav, and 5px bottom padding that need to be removed. Do you have our Simply CSS Lite plugin?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
brightideas
Using Simply CSS for the menu colors. Also, the -230px is part of the Pagelines code, not my customization. Here's what I ended up with to fix the side and bottom margins: [code] #primary-nav .content {margin: 0; padding: 0; background-color: #4a4a4a;} .main_nav_container {background-color: #4a4a4a;} #nav .content-pad, #secondnav .content-pad {padding: 0;} [/code] It's probably not pretty and it's probably bulky but I got it to do what I wanted to.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×