Beginner CSS and Dreamweaver Question

Discussion in 'Web Design and Development' started by krayziekray, Feb 2, 2010.

  1. krayziekray macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #1
    I'm developing the layout to my site, and have created the css code in Dreamweaver. I'm centering the wrapper div using the code:

    Code:
    ...
    margin-right:auto;
    margin-left:auto;
    
    Now this works perfectly when i have the css code in my webpage, but when i copy all my css code into a sperate file and link to to the page, my website is no longer in the center. ... I'm linking the css file like this:

    Code:
    <link rel="stylesheet" href="nameOfCSS.css" type="text/css" />
    
    Any ideas why this is happening?

    Cheers.
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    You're probably not specifying the correct and/or full path to the stylesheet.
     
  3. krayziekray thread starter macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #3
    But everything else in the stylesheet is working, all the margins, padding, header images etc. So the link to the CSS file i assume is working.

    Any other ideas?
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    We'll need to see more. Have a link? Have you tried other browsers? Maybe it's a cache issue.
     
  5. krayziekray thread starter macrumors 6502

    Joined:
    Sep 24, 2008
    Location:
    127.0.0.1
    #5
    Got it sorted. Basically, the first css property was not being read from the css file ... not sure why. :S So i have hacked it by simply created a blank, dumby css property.

    Code:
    #random {}
    // all the rest here <-- starts to read from here
    
    Thanks everyone for your help :D;)
     

Share This Page