Sunday 4 November 2012

Overriding the CSS styling

How to hack the CSS styling?

well, usually when we have some template with css class, and we want to adjust the style or we want to adjust the position or etc.. and we cant seems to find the codes on where to adjust it.
so we can perform a CSS hack.
its simple. but a lazy style. but its efficient and work great.
like this:


<div class="theclass">

some text here

</div>

it seems like there is a style class to the <div> tag. but we cant seems to find the class in the css file. then we perform the inline style CSS code.

like this:

<div class="theclass" style="color:#000000; width:300px; height:250px; background-color:#dedede;">

some text here

</div>

so the browser will render the inline style first and override the CSS for the current div.

have fun ;-)

Result:
some text here

No comments:

Post a Comment