473,796 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple CSS not even working for me

47 New Member
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 (workmenforChri st.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 1428
Bruno43
16 New Member
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 (workmenforChri st.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
Michael7
47 New Member
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

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

Similar topics

17
6526
by: savesdeday | last post by:
In my beginnning computer science class we were asked to translate a simple interest problem. We are expected to write an algorithm that gets values for the starting account balance B, annual interest rate I, and annual service charge S. Your algorithm would then compute and print out the total amount of interest earned during the year and the final account balance at the end of the year (assuming that interest is compounded monthly, and...
5
2638
by: calaha | last post by:
Hi all, I have been working with this since last night, and can't quite figure out why it's not working. I have a simple login box form that is set to be my startup form in my Access app (upon successful authentication, it opens the Switchboard). All it does is get the username and password, pull up a recordeset of the usernames and sets the UserId to be used throughout the session. The table Userlist is a SQL 2000 linked table. I can...
2
8404
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the client side javacript code for form validation and client side editing capabilities in order to save...
5
1804
by: Logickle | last post by:
Hi, all. I'm working on an application which requires communicating session info between separate web apps running on the same web server. The out of process server method sounded ideal, and very simple to implement as far as I could tell. So I re-configured my apps' web.config and machine.config files from InProc to StateServer, and confirmed that's the mode used by both web apps. To keep it simple, I created two basic ASP.NET apps...
18
3043
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How ??
2
1755
by: dondraper | last post by:
I have an application that uses a popular but simple set of JavaScript routines that implement an AJAX call used to populate a drop-down. It works for thousands of user but I have one customer where it does not work. It was working but quit over the weekend. I suspect their XML DOM was either changed, removed or disabled somehow. My assumptions are that the XMLHTTPRequest object used by the browser to make the http request is different...
5
1279
by: Newbie | last post by:
Hi all, Just want to comment on this thread. Seems like every discussion about this matter (setting up DB provider for membership) and all the samples/references given by some MVPs always refering to LOCALHOST in their solution. Aren't they all forget that people build an ASP.NET appl are plans to host their appl in an commercial hosting provider, whom most of them can't afford the fancy of dedicated servers - most of them hosts on shared...
6
9427
by: sathyashrayan | last post by:
Dear group, Following is a exercise from a book called "Oreilly's practical C programming". I just wanted to do a couple of C programming exercise. I do have K and R book, but let me try some simple one. Exercise 4-2: Write a program to print a block E using asterisks (*), where the E has a height of seven characters
10
110323
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and it also integrates UPX (Ultimate Packer for eXecutables) into the build process, if you have it installed. It also claims functionality on linux, as a bonus (I didn't test this). I highly recommend the UPX options, and will cover how to get it...
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5442
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.