• Hello,

    I’m not really at all adept at css and I’m having a problem with my main menu not going the full width of my content area and you can tell that by the fact that my logo fills up the width of the content area and my main menu falls just short of the length of my logo. I’ve played around content width area, nav main menu padding and font sizes in the css. No matter what I do I can’t get it right and it’s really affecting the display on mobile version of the site. Could someone please look both at my site http://www.corrosiveradio.com and the css code for my site and tell me what’s wrong.

    [ Moderator note: CSS redacted, just post a link to your stylesheet instead. ]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Wow, you really didn’t have to paste in the entire contents of your CSS file, we can take a look at it as long as you provide a link to your site. If you really have to show your code, use a pastebin instead.

    The problem is that you have a syntax error here:

    /*----------------------------------------------
       Navigation Menus
    -----------------------------------------------*/
    #nav-main {
    	background-color:#FF0000;
    	border-bottom: 0px solid #fff;
    	float: left;
    	width: 100%
    	padding-left: 13px;
    	z-index: 30;
    }

    The width property is missing a semicolon after the 100% value, that’s why the menu isn’t extending all the way across, because the browser is trying to interpret the padding-left as part of the value for width. Add a semicolon after the 100% and your menu will be OK.

    By the way, instead of modify the theme files directly, it is suggested that you create a child theme, or use a Custom CSS plugin if your theme doesn’t support custom CSS. Otherwise your changes are going to be lost the next time your theme is updated (don’t end up like this person.

    Thread Starter BJD

    (@bjd)

    THANK YOU!!!!!! I knew it had to be something like that. And sorry about pasting the whole, it’s just that I had become so uncertain about the where the problem could really be .

    THANK YOU AGAIN!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘css header help’ is closed to new replies.