Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2011
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,452
    Thanks
    23
    Thanked 631 Times in 630 Posts
    color is the color of your text. Add background-color: black; and you'll see the div.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •