Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Css On Html

(90 views • 3 replies)

This topic is 1 page long.

<< < > >>
None

J0Rel

Reply To Post Reply & Quote

Posted at: 5/12/08 12:39 AM

J0Rel NEUTRAL LEVEL 07

Sign-Up: 10/11/07

Posts: 126

Im feeling desperate about this situation... i dont know if its a bug or am im doing something wrong so here it goes:

I have this code on the html page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Flashy Toons</title>
<style type="text/css">
    #SubMenu {font-family:ElHombre;
	          color:#FFCC00;
			  font-weight:bold;
			  text-decoration:none;
			}
</style>

</head>
  <body bgcolor="#000000">
  <!-- Division --> 
<div align="center">
   <!-- Flashy Toons Banner -->
        <img src="Imagenes/FT_banner.jpg" style="margin-top:-10px" width="750" height="150"/>


       <hr width="75%" color="#FFCC00"  style="margin:5px" size="1px"/>

            <!-- Submenu-->
            <div class="SubMenu">
              <a href=""><Flashy Toons</a>
            </div>
                       
</div>
</body>
</html>
----------------------------------------------------------------------------------------------------------------

From my opinion there nothing wrong about it. The problem is that i cant change the link color and the CSS isnt working at all... like if doesnt exist.  So can anyone tell me what am i doing wrong or is it a glicth or something?
BBS Signature

None

Snake-Arsenic

Reply To Post Reply & Quote

Posted at: 5/12/08 01:37 AM

Snake-Arsenic EVIL LEVEL 12

Sign-Up: 02/24/07

Posts: 1,748

You're not using the right selector for it.
The # is used for selecting ids, the period "." is used for selecting classes. You also failed to select the anchor tag as well as it's link pseudo-class.

I suggest you do a little more reading up onCSSand at least go over the basics again to help you in the future and have a look at pseudo-classes if you don't know how to do the other states for your links.

You may also want to look at external stylesheets if you haven't already.

.SubMenu a:link {
  font-family:ElHombre;
  color:#FFCC00;
  font-weight:bold;
  text-decoration:none;
}

Newgrounds Classic 2: An animated theme for Firefox 3
Visit the official site for info and a generator to make customising easy.
The Computer Hospital

BBS Signature

None

BoneIdol

Reply To Post Reply & Quote

Posted at: 5/12/08 01:38 AM

BoneIdol NEUTRAL LEVEL 05

Sign-Up: 08/14/06

Posts: 762

Classes use element.classname whereas IDs use element#ID. You've got them mixed up.

Sufficiently advanced incompetence is indistinguishable from malice.


Resigned

J0Rel

Reply To Post Reply & Quote

Posted at: 5/12/08 02:22 AM

J0Rel NEUTRAL LEVEL 07

Sign-Up: 10/11/07

Posts: 126

AAAH ok ok... i get it LOL. Thanks for the help.

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 08:46 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!