1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Style Sheets

Discussion in 'Software Development' started by Rutter, Jul 14, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. Rutter

    Rutter Thread Starter

    Joined:
    Dec 17, 2001
    Messages:
    252
    Hey ladies and gents, ;)

    Looking for your views on the uses of style sheets on a website, I have tried in vain to find a site that will explain to me exactly how they work and why I should use them so I thought I'd ask u guys! :(

    Thanx for your help

    Rutter
     
  2. pyritechips

    pyritechips Gone but Never Forgotten

    Joined:
    Jun 2, 2002
    Messages:
    26,907
    First Name:
    Jim
    Hello Rutter:

    Style sheets, or CSS as they are commonly referred to, are a God send for coding webpages. Imagine entering all the colours and cellpadding and text aligning, etc., over and over again for 10 different pages. Then imagine wanting to change the pages, let's say to a diferent font or colour. You would have to go through all ten pages and manually edit all the values. With CSS you can open up one external CSS file, make a single change and all the pages that read that style sheet will change accordingly.

    For a much better and indepth explanation, with a tutorial and many try-it-yourself samples, go to W3Schools

    Hope that is what you are looking for.
     
  3. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    Style sheets are great!
    CSS is the language of style for webpages.
    CSS is (or should be) used to specify font colors, backgrounds, text sizes, alignment, paragraphs, links, etc.
    As pyritechips said, you can stick all your CSS code into 1 file and have it affect all of your pages (the C does stand for "cascading").
    Another great thing about css is Classes.
    You can create CSS Classes that each have a name and contain different style information, then selectively apply that class to parts of the page.
    Example: There are two paragraphs on your page. You want them both to have red text.
    This is the CSS
    p {font-color: red}
    Lets say you want one to have red text, and one to have blue.
    You could create a class for each one
    .redP {font-color: red}
    .blueP {font-color: blue}
    Then tell each paragraph what class to format itself by.
     
  4. Corrosive

    Corrosive

    Joined:
    Jan 9, 2003
    Messages:
    1,058
    If you know your HTML onions, CSS is a piece of cake. I found a pretty simple guide to starting it here, but you'll probably need to know a little HTML to properly understand it. www.css.nu is the site to go and get more information.
     
  5. Gibble

    Gibble

    Joined:
    Oct 9, 2001
    Messages:
    27,087
  6. Rutter

    Rutter Thread Starter

    Joined:
    Dec 17, 2001
    Messages:
    252
    Ok thanx for your help guys!

    Looks like CSS ;) is the way to go! Am going to sift through some of these links and I'll let u know how I get on!

    Rutter
     
  7. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    Ok-the one at w3schools that pyritechips posted is where I started-thats the best tutorial I've seen (although I'm sure the ones others recommended are good too).
     
  8. EmXtrix

    EmXtrix

    Joined:
    Jun 16, 2003
    Messages:
    106
    CSS is also the cornerstone of dHTML if noone mentioned that yet. Definitely have a look at webmonkey.com, they have amazing tutorials.
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/146895

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice