inline links with css

E

Eddy Long

Greetings all,
The following code snippet is for testing.

When mousing over the first name in the first line - Narrowsburg - only the
_first_ character of the word changes color - however the complete word is
an active link.

I'd like to have the complete word change color as well.

I am baffled.

Any help would be greatly appreciated.

Thanks a million,
E.
-----------------------------------------

//for testing

<html>

<head>
<style>

body {background:#FFFFFF;
border:3px solid #404040;
}

p.1{font-family:verdana;
font-size:18px;
text-align:center;
letter-spacing:.25em;

a:link{color:yellow;text-decoration:none;}
a:visited{color:#EAEAEA;text-decoration:none;}
a:focus{color:eek:live;text-decoration:none;}
a:hover{color:green;}
a:active{color:blue;text-decoration:none;}

}


p.2{font-family:verdana;
font-size:18px;
text-align:center;
letter-spacing:.6em;
}

....etc.


</style>
</head>

<body>

<div id="first">

<p class="1" style="margin-top: 0; margin-bottom: 0"
align="justify"><b><font face="Verdana" size="5" color="#EAEAEA"><a
href="http://www.letslink.com">.n</font><font face="Verdana" size="5"
color="#CAEEFF">a</font><font face="Verdana" size="5"
color="#EAEAEA">rr</font><font face="Verdana" size="5"
color="#FFC1C1">o</font><font face="Verdana" size="5"
color="#EAEAEA">wsb</font><font face="Verdana" size="5"
color="#D9B3FF">u</font><font face="Verdana" size="5"
color="#EAEAEA">rg</a></font><font face="Verdana" size="5"
color="#EAEAEA">.</font><font face="Verdana" size="5"
color="#EAEAEA">wh</font><font face="Verdana" size="5"
color="#FBC779">i</font><font face="Verdana" size="5"
color="#EAEAEA">t</font><font face="Verdana" size="5"
color="#7BF2A5">e</font><font face="Verdana" size="5"
color="#EAEAEA">lake.</a>jeffers</font><font face="Verdana" size="5"
color="#FFC1C1">o</font><font face="Verdana" size="5"
color="#EAEAEA">nville.</font></b>

<p class="2" style="margin-top: 0; margin-bottom: 0"
align="justify"><b><font face="Verdana" size="5"
color="#EAEAEA">.rosc</font><font face="Verdana" size="5"
color="#FFC1C1">o</font><font face="Verdana" size="5"
color="#EAEAEA">e.callic</font><font face="Verdana" size="5"
color="#FFC1C1">oo</font><font face="Verdana" size="5"
color="#EAEAEA">n.b</font><font face="Verdana" size="5"
color="#CAEEFF">a</font><font face="Verdana" size="5"
color="#EAEAEA">rryvill</font><font face="Verdana" size="5"
color="#7BF2A5">e</font><font face="Verdana" size="5"
color="#EAEAEA">.</font>
</div>

</body>
</html>
 
D

David Dorward

Eddy said:
The following code snippet is for testing.

Your HTML is invalid, and isn't well formed (this is probably the reason for
your problem).

http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Its way too much trouble top copy/paste your source into a file in order to
test it. Provide a URL next time please.

You haven't specified browsing environments you have tried your code in, or
which of them fail.

On a side note:

Pixels are not a good idea for font sizes.
http://css-discuss.incutio.com/?page=FontSize

<font> is deprecated and should not be used.
 
B

brucie

In alt.html Eddy Long said:

The following code snippet is for testing.

<quote>
Avoid posting multiple lines of markup, it wastes peoples time having to
reconstruct it before testing and often the markup posted is incomplete
and doesn't help identify the problem. Supply a link, it makes it much
easier for people to help you.
</quote> http://alt-html.info/
 
S

Starshine Moonbeam

Eddy Long said:
Greetings all,
The following code snippet is for testing.

When mousing over the first name in the first line - Narrowsburg - only the
_first_ character of the word changes color - however the complete word is
an active link.

I'd like to have the complete word change color as well.

I am baffled.

I bet you is.

<style>

p <-- affects all <p> tags, er, elements

a <-- affects all.....<a> elements

..whatever <-- class you can use using <span class="whatever">

</style>

You don't need to have a zillion font tags each with the same type of
font and with a size in them.

<style>

p {font-family: verdana; font-size: 150%/x-large/1.3em (pick *one*)
font-weight: bold;}

</style>

Not really sure how to get the multi-color effect without a bunch of
<span> ta...er...elements and a bunch of classes to use with them, which
for me, personally would be more effort than it's worth but maybe
someone has a better way for you.

<p>Close your p elements</p>

You don't really need the divs either (assuming that you're not just
posting the portion you need help on)

<a href="whatever.html">Narrowsburg</a>

Why do you have a border around the page? That's what your browser's
for.

Hopefully, this gets you closer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top