SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: CSS Help

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Ohio, USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a complete moron when it comes to this. I want black text set at 10pt. All links can be black and the font should be arial. This should be for an entire page. What would it look like in CSS?
    Visit http://www.igsites.com for all your gaming needs.

  2. #2
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here are a couple of useful CSS links.

    Articles:

    http://webreview.com/wr/pub/Style_Sheets

    Master Grid:

    http://webreview.com/wr/pub/guides/s...astergrid.html


  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For this specific example, this would work (other attriutes can be set, but this is what you specified):

    in the <head> section,

    <style>
    P {color: #000000;
    font-size: 10pt;
    font-family: Arial;
    }
    A {color: #000000;
    }
    </style>

    On a side note, it's generally not good practice to have your links set as the same colour as your text.

    For learning more about CSS, the links posted by etLux are good - also check out Webmonkey:

    http://hotwired.lycos.com/webmonkey/...lesheet_guide/

    or here at Sitepoint:

    http://www.webmasterbase.com/article.php?aid=43&pid=0

    m.


  4. #4
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    Kevin has written a short tutorial on Advanced Web Design but there is a link to a tutorial on CSS that i am going through now. You can find Kevin's work at www.webmasterbase.com/article.php?aid=265&pid=26.

    he talks in general terms about CSS and then links to an article by Mulder that is really fine.

    there are many other items covered in Kevin's article making it well worth a bookmark.

    [Edited by edshuck on 10-30-2000 at 06:53 PM]

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Musika...make sure that you let him know that his text must be enclosed inside <p></p> tags for that style to work.

    an easy way to do that same thing would be to say:

    <style>
    <!--
    body {color: #000000; font-size: 10pt; font-family: Arial; }
    A {color: #000000; }
    -->
    </style>

    if you style the body tag you won't have to use extra block level elements. Some people who have sloppy code will get bitten by your method.

    Further, please understand that to be on the safe side, you should add link and text colors into the body tag.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole, thank you - I just assumed that the <p> tags are a given. I use them, why wouldn't everybody?

    I never thought of <p> tags as extra elements. I use them as basic elements, as a necessary part of every CSS-based page. That way I can also specify classes such as P.small or P.copyright that further simply things.


    m.

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    exactly...but remember, even though you style a certain element, it still maintains it's inherent properties. A block of text with a p tag will still have the spacing associated with a p tag. It also limits you to using that class with only that tag. I find it more efficent to define a style like this:

    .copyright {font-family: arial; }

    then I call it with <span class="copyright">text here</span>, then if I so desire, I can use that style with ANY element.

    The span tag is nice because it is merely a container. It has almost no properties of its own, meaning that it is like a lump of clay waiting to be told what to become.

    When setting up your body text, you should alway open large blocks of text with <p> and close with </p>. If you need a blank line between "paragraphs" simply use <br><br>.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole - glad to see we think alike! I use span extensively for the exact reason you describe.

    and you're right - defining the style as .whatever instead of P.whatever is the better way to go. I only use P.whatever when I know I want the P spacing in every instance (like copyright info). But I didn't make that clear to igsites.

    everyone who read this thread - listen to creole!

    m.

  9. #9
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you rock musika...thanks.

    nice to see that there are others out there who like to be efficient
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •