Runboard.com
You're welcome.



       Use the black navigation bar to log in or create your account.

 
Lesigner Girl Profile
Live feed
Blog
Friends
Miscellaneous info

Minerva
Head of Runboard staff

Registered: 11-2005
Posts: 9597
Karma: 132 (+147/-15)
ReplyQuote
posticon FAQ: I put the CSS in but it doesn't work


You defined your posting area to have a black background, but it's still white. You've tried pasting and re-pasting the code, but it still doesn't work. What do you do?


Follow these steps to troubleshoot:

(1) Make sure you didn't re-define it further down in the code.

If you define something one way in one part of the code and then define it again another way further down in the code, browsers will be correct to display that item the way it was defined last.

(2) If you are defining a class name, make sure you didn't forget the dot.

If you want to define all <textarea> tags to look the same, you would define it with:

textarea { definitions in here }


If you want to define everything with a certain class name (for example,
<span class="classname">), you need to add a dot before the classname, like this:

.classname { definitions in here }


The validator you are about to read about will not pick up on this type of error, and just mistakes "classnames" for <tags>. So, you'll have to rely on your eyes to find these missing dots.

* On a sidenote, you may at some point use "id" instead of "class". With "id", those are defined in CSS with a # instead of a dot.

(3) Make sure your code is written correctly.

You can do this on your own, even if you're not a CSS expert. Open a separate browser window and go to this CSS validator. Copy the CSS in question from the custom CSS page for your board, paste it into the textarea (the big box) where it says "Enter the CSS you would like validated:" and click on the "Check" button.

For example, here is the code you are trying to use to make the background color of textareas black:

textarea { background-colour:#000000; }

You run that chunk through the validator, and it gives you this error:

• Line: 1 Context : .myclass

  Property background-colour doesn't exist : #000000

The problem is with the spelling, as CSS only understands the American spelling for colour, which is "color".

(4) If that chunk validates but it still doesn't work:

Make sure there are no "parse errors" in a different part of your CSS. If you have a parse error in one part of your code, it will cause other, properly-written CSS to not work. For example, you run this code through the validator:

.bottominfoline {
display:block;
text-align::center;
}
.topiclistaddareply {
font-family: verdana, arial, sans-serif;
background-color:#333333;
color:#ffffff;
}

Your addareply buttons don't look the way you've defined them, but the only error the validator gives is:

Line: 3 Context : .bottominfoline

Invalid number : text-align Parse Error - text-align::center

Here, the extra colon (:) is causing a parse error, so not only is the bottom info line not going to be centered because it's written incorrectly, but there's a good chance it will mess up the reply button which is defined later on in the code. In this case, delete the extra colon, run the new code through the validator, and see if there are any other errors in your CSS.

---
Runboard Knowledge Base
Runboard Support Forums
Find other message boards
10/5/2006, 6:40 pm Link to this post PM Lesigner Girl Read Blog
 


Add to this discussion




You are not logged in (login)
Back To Top

This board's time is GMT.

Board's time is GMT