0

Using Firebug, I finally (this has been an ongoing struggle) found the CSS that I need to edit to fix my sidebar spacing program. It's below:

#sidebar .widget {
margin-bottom: 45px;
position: relative;
}

What I want to do is edit the margin-bottom to be 5px instead of 45. However, I cannot seem to find this specific CSS anywhere. When I find it through Firebug, it's in a file called all.css, but I can only edit the style.css file through Wordpress.

I've tried changing it in the custom CSS, but that doesn't fix anything. Can someone please help me? I know nothing about CSS, and I was so excited to finally figure out what I need to change, and now I can't change it!

4
  • Try #sidebar .widget { margin-bottom: 5px !important; } Commented Nov 15, 2013 at 17:29
  • 1
    @ Jay Bhatt, That's not necessary if the OP has WP installed on their own server. But nevertheless is a quick solution to a minor problem. JavaScript could be used to override this; if all else fails. Commented Nov 15, 2013 at 17:30
  • Firebug should give you the full path to the all.css From the wordpress editor you should be able to edit that file whether its a theme file or if its a plugin file. Commented Nov 15, 2013 at 17:48
  • @JayBhatt I tried that already. No change. Commented Nov 15, 2013 at 17:56

1 Answer 1

1

Check in the <head> section, if the style.css is loaded after the all.css. If not, you must provide a CSS rule that will be more precise than the one from all.css, e.g.

#sidebar div.widget {
    margin-bottom: 5px;
    position: relative;
}

(if the .widget is a div, of course)

Sign up to request clarification or add additional context in comments.

4 Comments

It would be good practice to provide a more specific rule anyway, to conform to an architecturally solid style-sheet. Good answer though. +1
@JackWilliams I completely agree with you. I didn't mention that because I don't know the DOM of this particular website but I could have mention it anyway. Well, that's what the comments are for, I guess.
@matewka Sorry, I'm very new at CSS. Can you explain this a bit more?
Actually I can't until you show how the HTML look like. I mean, that part with #sidebar and its content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.