• Hi,

    I am trying to align the menu to the left, so there is no white space to the left of my menu box. There is now no more room to the right, but I can’t seem to eliminate the space on the left.

    As I also had to align my header to eliminate white space, this is the code I used:

    #page {
    	padding-left:0!important;
    	padding-right:0!important;
    	max-width:68.571428571rem;
    }
    
    header hgroup, #main, footer[role="contentinfo"], nav.main-navigation {
    	padding-left:20px;
    	padding-right:20px;
    }
    
    img.header-image {
    	border-radius:0;
    	align: center;
    
    }
    .main-navigation ul.nav-menu,
        .main-navigation div.nav-menu > ul {
            border-bottom: 1px solid #f68a1f;
            border-top: none;
    	margin-left: 0;
    	padding-left:0!important;
    	padding-right:0!important;
            width: 960px;
    	max-width:68.571428571rem;
    	align: left;
        }

    If I take out nav.main-navigation out of this part, it works:

    header hgroup, #main, footer[role="contentinfo"], nav.main-navigation {
    	padding-left:20px;
    	padding-right:20px;
    }

    However, this will align all text (and, I assume, everything else as well) on the whole page to the far left, which is not what I want. I am very new to CSS, so forgive me if I am making an obvious mistake, but after 30 minutes of searching the web, I still can’t figure it out. Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For modifications to themes you’ve not built from scratch, seriously consider using a Child Theme.

    Thread Starter Subseven

    (@subseven)

    Thanks for the advice. This is an offline version, and for some reason it can not find the child theme when I try to install it.
    However, as for now I don’t see it as necessary, does it serve just as a “back up?”. Can you not re-download 2012 if something seriously goes wrong?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    A Child Theme creates an environment whereby modifications can be made without compromising the theme, nor your modifications. Modifications made to themes’ files will erase whence themes update.

    No. Do not edit the Twenty Twelve theme. It is will be the default theme in WordPress 3.5 and having access to an unedited version of the theme is vital when dealing with a range of site issues. Use a child theme for your changes.

    http://quirm.net/themes/twenty-twelve-child/

    Thread Starter Subseven

    (@subseven)

    Thank you for the link, it worked now.
    By the way, how could you see that I am not using a child theme?
    However, I am still stuck with the original problem.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You were considering to modify the theme’s files;

    If I take out nav.main-navigation out of this part, it works:

    I didn’t know, I assumed.

    However, I am still stuck with the original problem.

    Although WordPress.org forums aren’t intended for this specific level of CSS support, you’d need to post a link to your website or PasteBin of your code. Otherwise it’s unlikely that someone will resolve the issue through hypothetical context.

    Thread Starter Subseven

    (@subseven)

    Ah, so now I made a child theme, and in the editor, it hides all original code. Is that the intention of creating a child theme, to protect the original? Sorry, my head is kind of buzzing right now and I am overlooking too many things, I could’ve most likely searched this up myself.
    This makes it easier for someone that doesn’t know what he’s doing. 🙂
    However, the code is empty now, so I should just be adding codes to spread the menu or align it to the left, is there no standard code for it? As I didn’t add much more than what I pasted.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Twenty Twelve] Align menu left?’ is closed to new replies.