External Stylesheets
Posted by CSSFloat in Tips on 10. Jan, 2010 | 1 Comment
External style sheets are great for applying the same styles to multiple pages on a website. Unlike internal styles, which need to be added to every single page, external style sheets can be imported directly from a .css file. The .css file must be linked from within the <head> section of your web code.
Here’s the [...]
CSS Style Tags
Posted by CSSFloat in Tips on 10. Jan, 2010 | 0 Comments
Style tags contain on-page CSS. Style tags can be placed anywhere within a document but are usually found within the <head> section.
#onpage-example {color: #90C; font: 1.2em “Palatino Linotype”, “Book Antiqua”, Palatino, serif;}
For example, this sentence was styled by the CSS in style tags directly above in the HTML code.
Don’t believe me? You’ll have to right [...]
CSS – Class Verus ID
Posted by CSSFloat in Tips on 10. Jan, 2010 | 1 Comment
When coding CSS, the choice between using class or id can be confusing to inexperienced web developers. The main reason for this is because most web browsers simply skip over these errors and process class and id styles exactly the same.
The general rule…
If you intend to use the CSS style more than once on a [...]
CSS Float Right
Posted by CSSFloat in Examples on 10. Jan, 2010 | 0 Comments
Floating an element right is exactly like floating left, except the code is
{float: right;} ie. #floatrightexample {float: right;}
This time we’re going to be floating an image that already has its width defined. Hence, there’s no need to include the width in the CSS code.
Also, did you notice the change in the CSS code?
We used a [...]
CSS Float Left Example
Posted by CSSFloat in Examples on 10. Jan, 2010 | 0 Comments
Here’s an example of using CSS Float to float an item left.
The square below with a blue border is a div tag aptly named “floatleftexample”.
.floatleftexample {float: left; width: 320px; border: 1px solid #00f; margin: 10px;}
In order for the blue square to float left of this text, the floatleftexample div must be above this paragraph in [...]
