Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to override external css?

I have an external css file which applies 35px padding to my content div. All my html pages are loaded inside that div but for one of them I want to use 0 padding-right.

I tried inline css, applying it directly on the body of that page and also using !important but nothing worked.

What I am I doing wrong?

index.html:

<div id="content"><?php include "page.html"?></div>

main.css:

#content{
    margin-top: 303px;
    padding: 35px;
    z-index:1;
}

page.html:

<body style="padding:0px;">
like image 962
zefs Avatar asked Oct 10 '12 21:10

zefs


1 Answers

To override a css setting you must use the keyword important.

<body style="padding:0px ! important;"> 
like image 78
Armando Peña Avatar answered Sep 22 '22 14:09

Armando Peña