|
Posted by Bob on September 22, 2004, 3:08 pm
Please log in for more thread options
Hello,
I have an <h1> banner that is white font on black background. I am using CSS
to style the banner in white on black.
I would like to hyperlink the words, but I want to force the hyperlink to
remain white in color rather than changing colors due to the hyperlink. Just
for the banner hyperlinks - not for the whole page with other hyperlinks.
Is there a way to force the banner hyperlink to remain white?
Thanks,
Bob
|
|
Posted by Els on September 22, 2004, 3:15 pm
Please log in for more thread options
Bob wrote:
> Hello,
>
> I have an <h1> banner that is white font on black
> background. I am using CSS to style the banner in white on
> black.
>
> I would like to hyperlink the words, but I want to force
> the hyperlink to remain white in color rather than changing
> colors due to the hyperlink. Just for the banner hyperlinks
> - not for the whole page with other hyperlinks.
>
> Is there a way to force the banner hyperlink to remain
> white?
Is the <h1> the only <h1> with hyperlinks in it on the page?
In that case:
h1 a:link, h1 a:visited, h1 a:hover, h1 a:active{
color:white;
background-color:black;
}
If it isn't, wrap it in a div with a class.
--
Els http://locusmeus.com/ Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: The Scene - Kans
|
|
Posted by Bob on September 22, 2004, 3:57 pm
Please log in for more thread options
> Bob wrote:
>
> > Hello,
> >
> > I have an <h1> banner that is white font on black
> > background. I am using CSS to style the banner in white on
> > black.
> >
> > I would like to hyperlink the words, but I want to force
> > the hyperlink to remain white in color rather than changing
> > colors due to the hyperlink. Just for the banner hyperlinks
> > - not for the whole page with other hyperlinks.
> >
> > Is there a way to force the banner hyperlink to remain
> > white?
>
> Is the <h1> the only <h1> with hyperlinks in it on the page?
> In that case:
> h1 a:link, h1 a:visited, h1 a:hover, h1 a:active{
> color:white;
> background-color:black;
> }
>
> If it isn't, wrap it in a div with a class.
>
> --
> Els http://locusmeus.com/ > Sonhos vem. Sonhos vão. O resto é imperfeito.
> - Renato Russo -
> Now playing: The Scene - Kans
Hello Els,
Yes, the <h1> is the only <h1> on the page and it would now be hyperlinked -
www.usernomics.com/testsite .
I will try the CSS you suggested.
Thanks a lot,
Bob
|
|
Posted by Els on September 22, 2004, 4:08 pm
Please log in for more thread options Bob wrote:
>> > I have an <h1> banner that is white font on black
>> > background. I am using CSS to style the banner in white
>> > on black.
>> >
>> > I would like to hyperlink the words, but I want to force
>> > the hyperlink to remain white in color rather than
>> > changing colors due to the hyperlink. Just for the
>> > banner hyperlinks - not for the whole page with other
>> > hyperlinks.
>>
>> Is the <h1> the only <h1> with hyperlinks in it on the
>> page? In that case:
>> h1 a:link, h1 a:visited, h1 a:hover, h1 a:active{
>> color:white;
>> background-color:black;
>> }
>
> Yes, the <h1> is the only <h1> on the page and it would now
> be hyperlinked - www.usernomics.com/testsite .
I see it's in a div too:
<div id="banner1"><h1>ERGONOMICS ~ HUMAN FACTORS ~ USER
INTERFACE DESIGN ~ USABILITY TESTING</h1></div>
(I wouldn't call that background black btw ;-) )
So if you add #banner1 before every h1 in that bit of css,
you'd be able to use more h1 hyperlinks on your pages without
styling them the same way as this one.
Like this:
#banner1 h1 a:link,
#banner1 h1 a:visited,
#banner1 h1 a:hover,
#banner1 h1 a:active
> I will try the CSS you suggested.
>
> Thanks a lot,
You're welcome :-)
--
Els
http://locusmeus.com/ Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
|
|
Posted by Leif K-Brooks on September 22, 2004, 5:25 pm
Please log in for more thread options Bob wrote:
> www.usernomics.com/testsite
This is off-topic, but I don't find the justified text to be very
usable. It ends up looking like this with really large
spaces; my eyes won't follow sentences over that much space.
|
| Similar Threads | Posted | | Mac/Safari Gamma Problem matching HTML color to GIF color? | April 18, 2006, 1:56 am |
| Button-hyperlink. | July 6, 2005, 1:15 pm |
| Submit a form with hyperlink | August 6, 2004, 11:56 pm |
| possible to use hyperlink to call a vbscript sub? | October 19, 2004, 10:46 am |
| I want to insert hyperlink to this document | June 28, 2006, 7:01 am |
| Does | January 4, 2006, 11:46 am |
| Can't directly access my web page through hyperlink | December 11, 2006, 5:45 pm |
| Is it possible to get the next hyperlink location in "EACH HTTP REQUEST HEADER?" | April 24, 2005, 10:09 am |
| Making a multi cell table row a single hyperlink. | May 30, 2005, 4:03 am |
| Cannot set background color (XML+CSS) | July 6, 2005, 12:16 am |
|