CSS: How to play with a and a div class and make changes in the style block by overwriting the old css style

<style type=”text/css”>
.yui-u p{margin-left:1em; }
.yui-ge p{margin-bottom:8em;}
</style>

An Embedded Code in an HTML to overwrite the referring CSS:

In Example above we see here that .yui-u is a div class which inherits the style functions of a certain css file(eg. say style.css which doesn’t have the margin left in the css.)

So in order to make changes in the inherited CSS emdebing above ling of .yui-u would refer that too a div class, and after a space p would refer to allĀ  the p tags and in {} we mention the attribute which we want it to be acted like.

similarly is for the second line .yui-ge p{} as shown above.

-sahil chokshi

About these ads

~ by technologyupdates on July 29, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: