PDA

View Full Version : Css


Techno
03-07-2004, 07:42 AM
hi

im new to CSS. i was wondering, how does CSS work? i mean if i tell any HTML page i have made to load a CSS, i take it that tables etc.. with certain colors or thetext etc... will be displayed for any page i have loaded the CSS? they can then edit in the html file the text they want to show....


basically part of the coursework assignment is to make a prototype (i can do this) which is easily updated...

that sounds easy and it probably is but i dont want the user have to set background colors, text fonts etc... everytime, they should use a config file that kinda does it for them? i take it that this is where CSS comes in?

Thanks!

agent002
03-07-2004, 07:49 AM
You should be able to achieve quite a lot with CSS. Nowadays, HTML attributes such as background, align, valign, border and the font tag are considered deprecated. HTML should only be used to define the page structure, and CSS to style them.

Create a file with a .CSS extension, for instance stylesheet.css. Then put this code between the <head> and </head> tags:
<link rel="stylesheet" href="stylesheet.css" type="text/css">
If you use the same CSS file on several pages, once you make a change to the CSS, the modifications apply on all pages using that stylesheet.

Here (http://www.w3schools.com/css/) is a good tutorial on CSS.

Joe
03-07-2004, 07:49 AM
CSS works by applying styles to certain tags that you declare either in the head of the page or in a external stylesheet

take a look at these links for more information:

http://www.w3.org/Style/CSS/
http://www.alistapart.com/
http://www.htmldog.com/guides/cssbeginner/
http://www.csszengarden.com/

Josh
03-07-2004, 09:55 AM
This (http://www.joe2kiss.btinternet.co.uk/v2/index.html) site has some good css tutorials also ;)

Techno
03-07-2004, 10:15 AM
thats great! thanks alot :)

ianmh
03-07-2004, 12:38 PM
Once you get the basics of CSS the site agent002 posted, w3schools has an invaluable reference page for CSS which I use all the time.

http://www.w3schools.com/css/css_reference.asp

Not so useful if you don't actually know CSS yet, but once you do its very handy. :)