Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-24-2011, 07:54 PM   PM User | #1
SHEPME
New Coder

 
Join Date: Mar 2011
Posts: 94
Thanks: 7
Thanked 0 Times in 0 Posts
SHEPME is an unknown quantity at this point
BODY will not carrry over

Hello:
I have copied and pasted all of my css coding into a .css file.
I started a new page with with the external style sheet as mentioned above.
<link rel="stylesheet"href="C:\Users\Shepard\Desktop\styles.css" />

Everything works great on the new page except the Body portion. In my style sheet I set left, right, top and bottom margins as well as background-color. When I open my new document it ignors my Body css code? My margins are all ar 0 and my color is white when it should be red.

Any clues?
SHEPME is offline   Reply With Quote
Old 04-24-2011, 08:09 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Post the css.
AndrewGSW is offline   Reply With Quote
Old 04-24-2011, 09:21 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello SHEPME,
Your link <link rel="stylesheet"href="C:\Users\Shepard\Desktop\styles.css" /> is referring to a file on your local C:\ drive, is that really the path you want to use? I would expect you really want to link to the styles.css on your server, not the one on your local machine.

See absolute and relative paths explained here.


That line might also work better with a space betweeen attributes like this
<link rel="stylesheet" href="C:\Users\Shepard\Desktop\styles.css" />
or, even better, something more like this <link href="C:\Users\Shepard\Desktop\styles.css" rel="stylesheet" type="text/css" />

For more help with checking your code see the links about validation in my signature line below.


To see why some of your CSS is being ignored, AndrewGSW is right in asking to see your code - both CSS and HTML would even be better.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

Last edited by Excavator; 04-24-2011 at 09:23 PM..
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 PM.


Advertisement
Log in to turn off these ads.