Really pathetic XHTML question(s)

Trip

Registered
Question: In plain XHTML how do I change the color and style of a link? I want to make my links a plain color and have no underline... but I can't seem to work out how to do it. [Edit: Another question is:] How can I put a space between plain text on a page? For example, if I want this: "ExampleExample" to look like this: "Example [a lot of space here] Example"?

Excuse: I'm not having a very pleasant day.
 
As for the space issue, have you tried using simple HTML "&nbsp" code where you want the spaces? So the code would look like:

Code:
Example       (...)   Example
 
For the color question you would do that with CSS

Code:
a:link
{
   color: colorcode;
   text-decoration: none; /* no underline */
}
a:visited
{ /* put visited style here */}
a:hover
{ /* put hover style here */}

check out http://www.w3schools.com for info, its usually pretty easy to find stuff there
 
You could also use a tag or two with CSS for the space issue. Do you have a pic, sketch, or example of what you're trying to do?
 
Now for a REALLY stupid question:

How (exactly) do you get the css to work with XHTML? I mean... how do I get my xhtml page to connect to (and use the info in) my css page?

Thanks for all of your help guys!
 
Trip said:
Now for a REALLY stupid question:

How (exactly) do you get the css to work with XHTML? I mean... how do I get my xhtml page to connect to (and use the info in) my css page?

Thanks for all of your help guys!

First save the doc you ahve all your CSS stuff in as whatever.css (say, yourfile.css for this example), then link to it within the <head> of the html doc that willl be accessing it in one of two ways:

1.
Code:
<link rel="stylesheet" type="text/css"  href="yourfile.css">

2.
Code:
<style type="text/css"> @import "yourfile.css"; </style>

Most of the time #1 is best, but the @import version (#2) is handy because it will not be recognised by very old browsers like Netscape 4. Which is a good thing, because NS4 will probably not render your CSS properly.
 
Back
Top