SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast MelissaMiller's Avatar
    Join Date
    Mar 2008
    Location
    des moines, ia
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Need CSS fundamental help, I'm a newbie.

    I just finished the "build your site the right way" book as well as some others from this site. I'm learning alot, but as usual with everything I learn I've hit a "fundamental" wall.

    I start a site by setting up my index page. The colors, margins, etc. all just right. These settings, as I understand it, are listed as CSS rules in my Dreamweaver program. So how do I apply this set-up group of rules to pages 2, 3 and etc. on my site? And what type of CSS rule is this?

    If I can just get past this hurdle, I feel like I can get started with my web-page revamp! I feel like maybe I'm making this harder than it is, or am blind to some kind of major point.

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should start by putting all your styles into an external stylesheet if you have not done this already. (e.g. styles.css)

    Make sure that you have linked to the external stylesheet in the <HEAD> area of your document.

    The link will typically look like this:

    Code:
    <link href="styles.css" rel="stylesheet" type="text/css" />
    In dreamweaver if you right click the "CSS styles" panel and choose "Attach style sheet" it will do it for you.

    As long as you have this link at the top of each page (you can check in code view) then those styles will be applied. Make sure that the relative path to the external style sheet is correct...

    If you're still stuck feel free to post the HTML/CSS code here...
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    You can link the same CSS to each of your different pages by putting this in between <head></head>:
    Code:
    <link type="text/css" rel="stylesheet" href="css_filename.css" />
    (Omit the / at the end if you are using an HTML doctype instead of XHTML).

    In Dreamweaver I believe it will put all of your CSS embedded into your document. What you need to do, if you want to do it the proper way, is to pull all of that CSS into an external .css file and then link it in the way I told you.

  4. #4
    SitePoint Enthusiast MelissaMiller's Avatar
    Join Date
    Mar 2008
    Location
    des moines, ia
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, you folks are SO helpful.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Connecticut
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    building first site have CSS ? for word-spacing

    I have a navagation bar across the top of the page instead of along the leaft side. I have defined a CSS rule to have word spacing of 25px. However 2 of the links have 2 words in them. How to I exclude the 2 word links from the word spacing?
    TIA
    susuyaya

  6. #6
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @susuyaya - You shouldn't be using word-spacing for that. I would simply apply a padding to your anchors or list items.

    If you need further help then go ahead a start a new thread with the code or a link to the page in question.
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Connecticut
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks Jimmy

    Thanks for the advice. When I get home I'll try that. I didn't know that you could add padding to anchors/links


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
  •