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 03-31-2012, 08:22 PM   PM User | #1
rob86
New Coder

 
Join Date: May 2007
Location: MI USA
Posts: 54
Thanks: 18
Thanked 1 Time in 1 Post
rob86 is an unknown quantity at this point
css tags not working on internet

Style sheet is working.


several tags on style sheet like this are not.

.footer
{
text-align:center;
font-size: 10px;
}



<body>

<div class="footer"> Be sure to use a descriptive title </div>

Just learned code works in <head> I want it on the stylesheet.

Any ideas why it dosen't work from stylesheet????

Last edited by rob86; 03-31-2012 at 08:44 PM..
rob86 is offline   Reply With Quote
Old 03-31-2012, 09:25 PM   PM User | #2
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 rob86,
It could be any number of reasons. The only way for anyone to tell is to see the testsite. Give us a link.
__________________
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
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
rob86 (03-31-2012)
Old 03-31-2012, 11:20 PM   PM User | #3
rob86
New Coder

 
Join Date: May 2007
Location: MI USA
Posts: 54
Thanks: 18
Thanked 1 Time in 1 Post
rob86 is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
Hello rob86,
It could be any number of reasons. The only way for anyone to tell is to see the testsite. Give us a link.
http://melendy-mi.us/gen/help.html

http://melendy-mi.us/gen/templates/t.../css/nancy.css

It would be easier if you use something that uses line numbers.

Line 137 is marked as "problem area" area.

The exact same code is in the document <head> remmed out. It works!!!
rob86 is offline   Reply With Quote
Old 04-01-2012, 12:51 AM   PM User | #4
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
In your linked .css file, this is invalid
Code:
p.firstPage {
	font-family:Comic Sans MS;font-size:20px;line-height:20px;    ;"
It's missing the closing } and the " is not needed, which is making everything below that line not work.

Check out the links about validation in my signature line. They can really help you. There is also a link about tables there that you should have a look at.
__________________
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-01-2012 at 01:04 AM..
Excavator is offline   Reply With Quote
Old 04-01-2012, 01:41 AM   PM User | #5
rob86
New Coder

 
Join Date: May 2007
Location: MI USA
Posts: 54
Thanks: 18
Thanked 1 Time in 1 Post
rob86 is an unknown quantity at this point
Thanks a bunch
I don't know how that happened but it's working now.

Now I have a new problem.

p.firstPage {
font-family:Comic Sans MS;font-size:20px;line-height:20px;
}

This code is used on a different page. It is now effecting the help page. I have researched this and found nothing.

Is there a way to stop this code from effecting the help page?
rob86 is offline   Reply With Quote
Old 04-01-2012, 01:56 AM   PM User | #6
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
Quote:
Originally Posted by rob86 View Post
Thanks a bunch
I don't know how that happened but it's working now.

Now I have a new problem.

p.firstPage {
font-family:Comic Sans MS;font-size:20px;line-height:20px;
}

This code is used on a different page. It is now effecting the help page. I have researched this and found nothing.

Is there a way to stop this code from effecting the help page?
Haven't you linked us to the help page? I don't see it affecting any paragraph text here.

Specificity is the answer though. If your styling is more a blanket style than pinpointed, you are not specific enough. See specificity here.
I disagree with some of what that page says, floats and specificity are pretty simple concepts for new coders to grasp. I think the box model and clearing floats give them more trouble.
__________________
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
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 09:22 PM.


Advertisement
Log in to turn off these ads.