How to use CSS to shift my menu div to the right?


Tags: css,wordpress,design,margin,padding

Problem :

My website is at http://www.santarosasda.com/

I want to move the menu over to the left, so it sticks out to the left. This is because I'm going to make the menu longer to stick out both sides. I'll reactivate the min-width when I figure out how to move the menu over. The CSS currently in place is:

#header-menu { /* <nav> */
    font-size: 1.1em;
    /* min-width: 980px; */
    }

I have tried using:

padding-right: 10px !important;
right: 10px !important;
margin-right: 10px !important;

I don't know what else to do. I know there has to be a way to move the menu. I am using Wordpress with the Risen theme.



Solution :

The answer is:

Use a negative margin.

By using a negative margin on the left side, I was able to shift the menu over to the left, extending it outward. Basically:

#header-menu { /* <nav> */
    font-size: 1.1em;
    min-width: 980px;
    margin-left: -10;
    }

This moved the menu over so that it extends out on both sides.


    CSS Howto..

    How to make image scale as per browser window?

    How to create text block over the images with css and make it responsive

    How to center an image between two columns in CSS?

    Jquery Hashtag link system (show what page the user is on)

    How to get width of
  • stretched to available space in parent
      in IE7?
  • How to Click a div and have it change dimensions of other divs and then change back once clicked again

    css how to get rounded corners on button.

    How do I control the height of the main content area no matter how much text is in there?

    How to apply css for a class within h2?

    How do I use existing CSS to style HTML content in textAngular

    How to create a floating mutlicolumn layout in CSS (Flexbox, float, inline-block)?

    How to get On/Off FlipSwitch to trigger function

    How to have a multiline CSS horizontal scroll?

    How to change size of text input but not textarea in jquery mobile

    How to draw image dynamically on a canvas line between two cells

    How can I register a css page from an ascx control?

    Bootstrap: How to make repeated divs go around a fixed div

    How can I use Perl to get a list of CSS elements with a color or background color attribute?

    How to style a form element when an input is focused?

    How to make one string from a sentence capital in HTML/CSS?

    How to change height of ui-grid row?

    how to have css affect other divs in the same container

    Bootstrap CSS How To: Create a ContentBox with a Title Bar

    CSS: How to get rid of the extra space of first line of a paragraph?

    How to make sure my css overlay is on top at any site?

    CSS: How do I keep the text from wreaking havoc on the layout?

    How to remap CSS shortcut key in Mac Bluefish text editor

    why image show space and go right, it should be fill up the gap

    How find all elements with a specific css property in a div and add a class to div

    How to cancel an upstream CSS declaration?