Steven Matthews
Steven Matthews

Reputation: 11285

Why isn't my CSS working (even when I use !important)

Why is my CSS not working? I'm trying to edit the margins for the image, to center it.

I've put "margin-left: 135px !important;" and "margin-right: 335px !important;" in my css file, selected the correct class and tag, and it is showing struck out in Google Chrome. Firefox isn't even showing the CSS.

The class is .mainlogo-img.

The site is www.barflypub.com

Upvotes: 0

Views: 122

Answers (1)

Johannes Egger
Johannes Egger

Reputation: 4041

You mustn't use spaces between the value and "px". margin: 0px 335px 0px 135px; will work.

Upvotes: 4

Related Questions