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 09-06-2012, 03:29 AM   PM User | #1
nivlat
New to the CF scene

 
Join Date: Sep 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
nivlat is an unknown quantity at this point
css id problem

Hi everyone,
I'm new to web design and getting crazy with this:

css
----------------------
#content{
color: red;
}
#test{
color: blue;
}
---------------------

html
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>the trashcan</title>
<link rel="stylesheet" type="text/css" href="main2colonne.css"/>
</head>
<body>
<div id="container">
<div id="header"></div><p>the trashcan logo</p>
<div id="content"></div><p>love<br/>you<br/>long<br/>time</p></div>
<div id="navigation"><p id="test">link</p>
<div id="footer"></div><p>copyright</p>
</div>
</body>
</html>
--------------------------------------------------------------

the word "link" does get formatted in blue, but the words "love you long time" don't get red.
I've checked everything I've tried everything but I can't find out where's the problem...

Many thanks in advance,
nivlat
nivlat is offline   Reply With Quote
Old 09-06-2012, 03:35 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,449
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
<div id="content"></div>

This div has no content - you have the </div> in the wrong place.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 09-06-2012, 03:35 AM   PM User | #3
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
Code:
<div id="content"></div><p>love<br/>you<br/>long<br/>time</p></div>
You've opened and immediately closed the div "content" so the words "love you.." are not within this div, and therefore not coloured red.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 09-06-2012, 03:41 AM   PM User | #4
nivlat
New to the CF scene

 
Join Date: Sep 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
nivlat is an unknown quantity at this point
thank you boys, I would have nerver find out.....
nivlat 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 03:30 AM.


Advertisement
Log in to turn off these ads.