By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Simple CSS not even working for me

P: 47
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
Share this Question
Share on Google+
2 Replies


P: 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

P: 47
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.