CSS and HTML Help!

I am trying to learn CSS properly as i currently use internal css in dreamweaver and want to know use external which should be more helpful.
Are there any good videos on how to link external style sheets and good practices to to.

I use www.dynamicdrive.com for most of my CSS stuff if i can and just link it in but sometimes messes up the whole site, any vids or tuts on doing it properly.

An external CSS file is using <link> tags in the head. If you are putting CSS between <style> tags in the head, and copying that directly to a new css file you should not notice any changes.

wow seems abit complex, i currently make a div in dreamweaver that’s all good is there a way to attach a external css file to that div instead of writing it.

As was explained the external CSS file is used for defining the associated DIV “class value” instead of writing an inline style several times within the element itself.

For example in the external CSS file; .devnull {color: red;} and within the HTML <div class=“devnull”>xyz</div> instead of writing <div style=“color red”>xyz</div> for each individual DIV.

wow seems abit complex, i currently make a div in dreamweaver that’s all good is there a way to attach a external css file to that div instead of writing it.

You don’t attach the CSS to the element… you attach a CSS file to your HTML file. So, two files.

Then as xhtmlcoder described, the HTML file calls the CSS file with <link rel=“stylesheet” type=“text/css” href=“path/to/stylesheet.css”> and use tokens like id’s and classes on your divs and other element to target them with specific styles… though a lot of the time you don’t have to use the token. If that div were the only div child of the body, you can just use the element name in the CSS.

This is all explained in much more detail on any CSS tutorial site, really. Sites like HTMLdog.com

In cases like these I always tend to recommend a book like Head first HTML and CSS.

If you want to learn to do it properly, you may find the structure of a book helpful in getting you up to scratch with the basics. :slight_smile:

I always suggest you to refer the corresponding websites for your doubts. To link external style sheet I found steps in Adobe itself. View this Link to external style sheet . It will clear your doubts exactly.

Here’s a quick package I put up for you. This is what I use when I start a project. It will give you an idea on how things work.

http://www.romeotovaradero.com/xhtml-blank.zip