Search code examples
csslistmargins

trying to use a negative margin in css on a list


I have been trying for an hour to get a list in a sidebar of WordPress to have a negative margin. Fooled around with margins, padding, sidebar placement in the php files... But the link images just keep disappearing behind the background.

Here's the page where I'm working: http://kirahenschel.com/

This is what I am trying to achieve: http://emgraphics.net/kira/idea2-11.jpg

Ideally I'd also like that sidebar to be a finite height so the white boxes on the bottom spread, but I can cope with them being off to the right.

Anyone have any ideas? Neg margins are working fine on the logo, so it is just a list thing?

Thanks


Solution

  • If you're merely trying to get the list to be bumped to the left, why not use a CSS positioning property? Negative margins can get really wonky, and are (most likely) unneeded in this application.

    #nameoflistdiv {
        left: -20px;
    }
    

    You may also need to change the value of your div's position element, but this will bump your div and everything in it left, overlapping the container div.

    If that doesn't answer your question, can you post the HTML and CSS you are using? The CSS code

    margin-left: -20px; 
    

    really should work in this application as well, so show us what you've got.