August 10th, 2009
CSS, Inline styles can be applied directly to elements in the HTML code using the style attribute. However, inline styles should be avoided wherever possible because the styles are added to the HTML markup. This defeats the main purpose of CSS, which is to apply the same styles to as many pages as possible across your website using external style sheets Read More...
Tags: CSS, How To, html, id, inline, selectors, style, styles, Tutorials
Posted in CSS Applying Styles |
No Comments »
August 1st, 2009
Border properties can be converted to the shorthand border property. The <h1> element can be styled with border-width, border-style. and border-color or with a single border property.
Longhand Properties
h1, h2 {
text-align: center;
color: navy;
}
h1 {
border-width: 1px;
border-style: solid;
border-color: gray;
}
h2{
font: italic small-caps bold 100%/120% arial, helvetica, sans-serif;
}
p {
color: maroon;
font: 80% arial, helvetica, sans-serif;
}
Shorthand Border
h1, h2 {
text-align: center;
color: navy;
}
h1 {
border: 1px solid gray;
}
h2{
font: italic small-caps bold 100%/120% arial, helvetica, sans-serif;
}
p {
color: maroon;
font: 80% arial, helvetica, sans-serif;
}
Tags: borders, CSS, div, How To, inline, tables
Posted in Understanding CSS |
No Comments »