CSS: THE BASICS - ID’S AND CLASSES … CORRECT

Css

Cascading Style Sheets

Two types of call sheets: Internal and External

Internal - You append your call cipher correct into your html code.
These stylesheets should exclusive be utilised if you are intending to
create a limited tender with a limited style. If you poverty to be
able to attain orbicular changes to your website using exclusive digit style
sheet, you hit to use….

External Stylesheets - Instead of swing every the call code
into your html code, you crapper create a azygos writing with your
css cipher and unification to it within your webpages code. It would look
something aforementioned this

{head} {title}Webpage title{ itle} {link rel=”stylesheet”
type=”text/css” href=”http://www.yourdomain.com/css”} {/head}

If you end to ingest an interior stylesheet, you hit to put
your css call wihin the mass tags:

{style type=”text/css”} {/style}

All css or instruction to the outside stylesheets hit to go in
between the {head} tags

Now most Css Classes vs. ID’s

The digit field disagreement between a collection and an id is that
classes crapper be utilised binary nowadays within the aforementioned tender patch an
Id crapper exclusive be utilised erst per page.

Example:

ID - The orbicular guidance of your site, or a guidance bar. A
footer, header, etc. Only items that materialize in exclusive digit place
per page.

Class - Anything that you would ingest binary nowadays in your page,
such as titles, subtitles, headlines, and the like.

Creating ID ’s

To create an Id in your css, you would move with the number
sign (#) and then your adjudge of the id. Here’s an warning

#navigation { float:left; }

To append the id in your html, you would do something aforementioned this

{div id=”navigation”} {/div}

You crapper also append an id within added digit aforementioned this

{div id=”navigation”} {div id=”left}

{/div} {/div}

Remember to near the id’s in order.

Now, onto css classes.

Creating Classes

To create a collection in your css, ingest this

.subtitle { color: #000000; }

To append the collection into your html, do this

{p class=”subtitle”} {/p}

Now, you crapper ingest the aforementioned collection repeatedly in the aforementioned page
unlike Id’s.

I also poverty to verify you something most unification attributes. You
should ever ready them in this order:

a { color: #006699; text-decoration: none; font-size: 100%; }

a:link { color: #006699; text-decoration: none; }

a:visited { color: #006699; text-decoration: none; }

a:hover { color: #0000FF; text-decoration: underline; }

a:active { color: #FF0000 }

Of course, you crapper modify the colours and text-decorations. This
is meet something I revilement discover of my code!

Okay, these are the basics. What I highly propose is to go and
download Topstyle Lite by feat here:

http://www.bradsoft.com opstyle slite/index.asp

It’s liberated and is a rattling adjuvant css editor. It not exclusive color
codes and organizes your code, but it provides you with heaps of
attributes that you crapper add to your collection and id elements with
just a click. They also wage a concealment at the lowermost to view
your css cipher as you create it. Very multipurpose for a liberated edition
and I’m hunting to acquire the favoring edition soon.

Now, this was meet a rattling rattling short account of the vital
elements necessary when structuring your css. I hit a beatific feeling
that when you download crowning call lite, you module see how to use
the hundreds of attributes in your classes and id’s

Good Luck in Your Web Designing Efforts!

P.S Change { and } to < and >

Comments are closed.