471,618 Members | 1,157 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Simple CSS not even working for me

Hi everyone,

I'm new to CSS of course, and have been trying to learn it. However, when I try to pull off something as simple as positioning of text . . . nothing works in my index page. So in frustration I made a test page. Just a but of words to test only the code I'm looking for.

Still nothing!

I apologize if this question is a nuisance, but could anyone perhaps at least let me know what I'm doing wrong with this very simple thing? I figure if I can just get a simple thing going, I can move onward with fewer trouble, but I can't even get this part!

The page giving me trouble is this:
Test Page (workmenforChrist.org/test.html)

The CSS file, simple enough, has only this in it:
Expand|Select|Wrap|Line Numbers
  1. /*The different styles for the website*/
  2.  
  3. /*Sidebar positioning/*
  4.  
  5. .sidebar {
  6. position:       absolute;
  7. width:          150px;
  8. top:            0px;
  9. left:           0px;
  10.  
  11. }
  12.  
  13. a.sidebar {color: #2f4f4f}
  14.  
I'm sure it's something simple I'm just not getting . . . but I cannot figure it out for the life of me! I even copied the sidebar positioning code from somewhere else in case I was doing something wrong (just changed the width number, and added "px" to the end of it because I noticed it was missing . . .)!

I really appreciate the help on this, and apologize if it's a nuisance, thanks in advance for the help!

~Michael
Sep 20 '07 #1
2 1352
Bruno43
16
Hi everyone,

I'm new to CSS of course, and have been trying to learn it. However, when I try to pull off something as simple as positioning of text . . . nothing works in my index page. So in frustration I made a test page. Just a but of words to test only the code I'm looking for.

Still nothing!

I apologize if this question is a nuisance, but could anyone perhaps at least let me know what I'm doing wrong with this very simple thing? I figure if I can just get a simple thing going, I can move onward with fewer trouble, but I can't even get this part!

The page giving me trouble is this:
Test Page (workmenforChrist.org/test.html)

The CSS file, simple enough, has only this in it:
Expand|Select|Wrap|Line Numbers
  1. /*The different styles for the website*/
  2.  
  3. /*Sidebar positioning/*
  4.  
  5. .sidebar {
  6. position:       absolute;
  7. width:          150px;
  8. top:            0px;
  9. left:           0px;
  10.  
  11. }
  12.  
  13. a.sidebar {color: #2f4f4f}
  14.  
I'm sure it's something simple I'm just not getting . . . but I cannot figure it out for the life of me! I even copied the sidebar positioning code from somewhere else in case I was doing something wrong (just changed the width number, and added "px" to the end of it because I noticed it was missing . . .)!

I really appreciate the help on this, and apologize if it's a nuisance, thanks in advance for the help!

~Michael
Close your Css comment style tag correctly
/* */
That will get your css working :)

Also it is good practice to close your statments properly
a.sidebar {color: #2f4f4f}
should be
a.sidebar {color: #2f4f4f;}

Add the Semicolon ;)
Sep 20 '07 #2
Ah, I KNEW it had to be something as simple as the comment close! Sheesh!

Thanks so much for that!

And thanks for the advice about the semicolon. I always wondered about it, but everywhere I saw, they only put the semicolons on multiple declarations.

Thanks again for the help!
Sep 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by savesdeday | last post: by
5 posts views Thread by Logickle | last post: by
18 posts views Thread by Q. John Chen | last post: by
5 posts views Thread by Newbie | last post: by
6 posts views Thread by sathyashrayan | last post: by
1 post views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.