...

View Full Version : css style help



deldel
05-10-2009, 11:04 AM
hi can someone please explain this CSS code to me thanks

.myNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF0000;
}
.my2ndNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF0000;
}
.my3rdNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12pt;
color: #FF0000;
}

itsjareds
05-10-2009, 06:00 PM
It does exactly what it says. Any HTML element that has any of those classes will have those CSS styles applied to them.

For example:


<span class="my2ndNewStyle">Testing</span>

Will apply the style for .my2ndNewStyle. The values are:

font-family: Verdana, Arial, Helvetica, sans-serif;

This means that it will use the font Verdana, and if that font is not found, use the second, and so on.

font-weight: bold;

This turns the font bold

color: #FF0000;

This turns the font to the color red (hex is written as RRGGBB, with F being the highest value and 0 being the lowest)


So, overall, text will look like this:
Testing


I hope this wasn't homework

deldel
05-10-2009, 07:20 PM
thanyou it and no it isnt homework

hkp
05-11-2009, 07:29 AM
hi can someone please explain this CSS code to me thanks

.myNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF0000;
}
.my2ndNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF0000;
}
.my3rdNewStyle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12pt;
color: #FF0000;
}

In this code three class are made. In the every class font style, font weight, color of the text has been declare.

this can be used in the html code as below....

<p class="my3rdNewStyle>your text</p>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum