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 10-25-2010, 03:29 PM   PM User | #1
noob700
New to the CF scene

 
Join Date: Oct 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
noob700 is an unknown quantity at this point
Followed tutorial & am lost

Hi, everybody,

I'm totally new to CSS and right now just as lost.

I followed this youtube tutorial:
http://www.youtube.com/watch?v=H3KESBQTD8k

and as far as I am aware, my style sheet and my html index look just like they look in the video. Still, I don't get the desired output. The header works, and the leftnav is colored, but apart from that, nothing happens.

my style sheet:

#container {

width: 900px;

}

#header {

width: 900px;
height: 100px;
background-image: url(Schweiz.png);
border-bottom: 2px solid #000000;

}

#leftnav {

float: left;
width: 140px;
height: 400px;
background-color: #F8AA3C;
border-right: 1xp dashed #694717;

#rightnav {

float: right;
width: 140px;
height: 400px;
background-color: #F8AA3C;
border-left: 1xp dashed #694717;

#body {

width: 620px;

}

#footer {

clear: both;
background-color: #D1C0A7;

}

my html index:

<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>

<div id="container">

<div id="header">A</div>

<div id="leftnav">B</div>

<div id="rightnav">E</div>

<div id="body">C</div>

<div id="footer">D</div>

</div>

</body>
</html>

I would be overjoyed if somebody could help me out here. I use firefox, btw, if that helps.

Thanks loads,
C.
noob700 is offline   Reply With Quote
Old 10-25-2010, 03:34 PM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
You are missing the closing bracket on these two css statements:

Code:
#leftnav {

float: left;
width: 140px;
height: 400px;
background-color: #F8AA3C;
border-right: 1xp dashed #694717;

#rightnav {

float: right;
width: 140px;
height: 400px;
background-color: #F8AA3C;
border-left: 1xp dashed #694717;
..and xp should be px. The w3c css validator will help you find these issues, as will the html validator for your markup.
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
noob700 (10-25-2010)
Old 10-25-2010, 03:38 PM   PM User | #3
noob700
New to the CF scene

 
Join Date: Oct 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
noob700 is an unknown quantity at this point
Fairly dumb of me.

Thanks a lot, also for the helpful link!
noob700 is offline   Reply With Quote
Old 10-25-2010, 03:40 PM   PM User | #4
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
You're welcome. I might add that that tutorial is deficient in that there is no doctype specified on the page - without this IE in particular is quite likely to misbehave. You should have a doctype at the very top of your html:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>

<div id="container">

<div id="header">A</div>

<div id="leftnav">B</div>

<div id="rightnav">E</div>

<div id="body">C</div>

<div id="footer">D</div>

</div>

</body>
</html>
SB65 is offline   Reply With Quote
Old 10-25-2010, 03:44 PM   PM User | #5
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
Be careful of youtube videos. As SB said about the doctype, some of those videos are either incomplete or just flat out wrong. You should go to some respected coding sites for good tutotials such as w3schools or w3c.org

There are also some very good books out there relatively inexpensive that has step by step tutorials along with downloadable excercise files to work through. HTML and XHTML New perspectives 5th edition is a very good book.
teedoff is offline   Reply With Quote
Reply

Bookmarks

Tags
css, lost, tutorial, youtube

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:48 AM.


Advertisement
Log in to turn off these ads.