Jump to content

External style sheet


bill_waterson
 Share

Recommended Posts

I am trying to create a style sheet with an external link. I have placed the link in the header as you can see below.<link href="../css/global.css" rel="stylesheet" type="text/css"/>and this is my style sheet, I saved it as global.cssBODY { background-color : #ffffff; color : #000000; font-family : arial, verdana helvetica, sans-serif; margin-left : 8%; margin-right : 5%;} FOOTER { color : #0000FF; font-family: arial, verdana helvetica, sans-serif; font-size : 10px;} CAPTION { color : #990000; font-family : arial, verdana helvetica, sans-serif; font-size : 10px; font-style : italic;}And this is how I am trying to link it to the sections on the page<td colspan="4" class="caption">TEXT TEXT TEXT TEXT TEXT TEXT TEXT</td>and<table border="0" width="520"><tr><td align="center" class="footer"> <a href.html" class="footer""><font color="#0000FF">??</font></a> | <a href=".html" class="footer"><font color="#0000FF">??</font></a> | <a href=".html" class="footer"><font color="#0000FF">??</font></a> | <a href=".html" class="footer"><font color="#0000FF">??</font></a> <br> <a href=".html" class="footer"><font color="#0000FF">??</font></a> | <a href=".html" class="footer"><font color="#0000FF">??</font></a> | <a href=".html" class="footer"><font color="#0000FF">??</font></a> | <p>

Link to comment
Share on other sites

You were almost there, you just missed two things. The first, you're missing the class period in front of your styles (e.g. ".caption"). Note that "body" doesn't require a period because it's targeting an HTML tag named <body>. The second, is that CSS is case-sensitive, meaning that "CAPTION" and "caption" are two different things. Usually in code (HTML, CSS, JavaScript, PHP), mostly everything is done in lower-case, so stick to that format so you can avoid confusion. I hoped that helped you out some.http://www.w3schools.com/css/css_pseudo_classes.asphttp://www.w3schools.com/css/css_syntax.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...