Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

krayziekray

macrumors 6502
Original poster
Sep 24, 2008
333
0
127.0.0.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.
 
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?
 
We'll need to see more. Have a link? Have you tried other browsers? Maybe it's a cache issue.
 
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;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.