Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Dumb problem w/linked style sheet
Old 11-14-2007, 05:13 PM Dumb problem w/linked style sheet
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
When I have
Code:
BODY {
background-color: #CCCCCC;
margin: 0;
position: relative;
}
In a linked style sheet the background color of the page does not change. However if I put it on the page between the head tags the pages background color does change.

The frustorating thing about this is that if I change other things in the linked style sheet (e.g. the color of a table cell), the change is readily apparent on the webpage. So the style sheet is linked correctly, but I have this problem.

Any idea's as to why this problem chooses to haunt me?

Thanks
Nathan
Nathand is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-14-2007, 05:29 PM Re: Dumb problem w/linked style sheet
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
do we get to see the style sheet in use somewhere?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-14-2007, 05:40 PM Re: Dumb problem w/linked style sheet
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
Uh, yeah :-)

Webpage: http://superiorphoneservice.com/test.php
Stylesheet: http://superiorphoneservice.com/ihavestyle.css

You can see right now the background is grey because I have that code in the header.
Nathand is offline
Reply With Quote
View Public Profile
 
Old 11-14-2007, 06:40 PM Re: Dumb problem w/linked style sheet
shivaji's Avatar
Ultra Talker

Posts: 318
Trades: 0
First remove your css from webpage:
Quote:
<style type="text/css">
BODY {
background-color: #CCCCCC;
margin: 0;
height: 100%;
width: 100%;
position: relative;
}
</style>
Then remove from ihavestyle.css first line:

Quote:
<style type="text/css">
and last line:
Quote:
</style>
Shivaji
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-14-2007, 06:47 PM Re: Dumb problem w/linked style sheet
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
Ahhh, so you don't put the style tags inside the .css document. Didn't know that, thanks.
Nathand is offline
Reply With Quote
View Public Profile
 
Old 11-14-2007, 06:56 PM Re: Dumb problem w/linked style sheet
shivaji's Avatar
Ultra Talker

Posts: 318
Trades: 0
Right, you don't need tags in external css document.
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-15-2007, 04:56 PM Re: Dumb problem w/linked style sheet
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You also don't need to set position:relative on the BODY, that's totally unnecessary.

Now, if you have a "wrapper" that holds the rest of your layout, adding position:relative to that makes sense.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Dumb problem w/linked style sheet
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29792 seconds with 12 queries