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-10-2011, 05:21 AM   PM User | #1
pineappelle
New Coder

 
Join Date: Jun 2011
Posts: 34
Thanks: 1
Thanked 0 Times in 0 Posts
pineappelle is an unknown quantity at this point
I'm having problems with my sidebar.

Ok so i am just trying to make a little sidebar and then buttons to be able to change the color of the background and the sidebar. The only problem is that i cant actually get the sidebar to show up. I used to be able to make little boxes floating around but now i cant seem to get it. i dont know what im doing wrong.

the code for the html is this
Code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="file:///C:/Documents%20and%20Settings/Ian/Desktop/sidebar.css">
</head>
<body>

<div class="sidebar">
</div>

</body>
</html>
and the css code is this
Code:
div.sidebar {
	width: 100px;
	height: 400px;
	color: red;
}
note these are just saved on my computer and i open them in safari.
pineappelle is offline   Reply With Quote
Old 09-10-2011, 02:40 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
color is the color of your text. Add background-color: black; and you'll see the div.
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Tags
class, css, div, html, sidebar

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 06:30 AM.


Advertisement
Log in to turn off these ads.