473,714 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Color of hyperlink

Bob
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
Jul 23 '05 #1
20 13807
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?


Followups set to ciwas.

h1 a { color: white; }

--
Mark.
http://tranchant.plus.com/
Jul 23 '05 #2
Els
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 vo. O resto imperfeito.
- Renato Russo -
Now playing: The Scene - Kans
Jul 23 '05 #3
"Bob" <ergobob@soni c[no spam].net> writes:
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?


Yes.

Before you do, consider two things:

1) How is the user supposed to know it's a link?
1a) How do they tell whether it's visited or unvisited?
2) What on earth is it linking to? If you're using <h1> properly - for
a page title - then what does it link to? If you're using <h1> just
to get big text, then don't - use CSS to style something else to
look right.

In a few contexts they may be unimportant. But generally it's quite
important. You probably have one where it is important - post a URL
with an example if you want that confirming.

For the how:
Use CSS. You'll need to look up 'descendant selectors' (or use
inline styles, but that's not a good idea except for testing) and the
'color' and 'background' properties.

--
Chris
Jul 23 '05 #4
Bob

"Chris Morris" <c.********@dur ham.ac.uk> wrote in message
news:87******** ****@dinopsis.d ur.ac.uk...
"Bob" <ergobob@soni c[no spam].net> writes:
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?


Yes.

Before you do, consider two things:

1) How is the user supposed to know it's a link?
1a) How do they tell whether it's visited or unvisited?
2) What on earth is it linking to? If you're using <h1> properly - for
a page title - then what does it link to? If you're using <h1> just
to get big text, then don't - use CSS to style something else to
look right.

In a few contexts they may be unimportant. But generally it's quite
important. You probably have one where it is important - post a URL
with an example if you want that confirming.

For the how:
Use CSS. You'll need to look up 'descendant selectors' (or use
inline styles, but that's not a good idea except for testing) and the
'color' and 'background' properties.

--
Chris


Hello Chris and Everyone,

The <h1> on each of my pages is not hyperlinked right now and describes the
major topics on the page. You can see a sample of this on my new test pages
at www.usernomics.com/testsite . It is the top black banner.

The reason for wanting to hyperlink these keywords, has to do with Search
Engine Optimization. The notion is that there is extra weight assigned by
search engines to words within the body that are hyperlinked. Since the <h1>
contains all of my keywords, I thought it would not hurt anything to give it
a shot. But I don't want to destroy to look and feel of the banner.

I do want to do this with CSS and my new CSS can be seen at
www.usernomics.com/testsite/main.css .

I am new to CSS so any help will be appreciated.

Thanks a lot,

Bob

Jul 23 '05 #5
Bob

"Els" <el*********@ti scali.nl> wrote in message
news:Xn******** *********@130.1 33.1.4...
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 vo. 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
Jul 23 '05 #6
Els
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"><h 1>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 vo. O resto imperfeito.
- Renato Russo -
Jul 23 '05 #7
"Bob" <ergobob@soni c[no spam].net> writes:
"Chris Morris" <c.********@dur ham.ac.uk> wrote in message
2) What on earth is it linking to? If you're using <h1> properly - for
a page title - then what does it link to? If you're using <h1> just
to get big text, then don't - use CSS to style something else to
look right.
The <h1> on each of my pages is not hyperlinked right now and describes the
major topics on the page. You can see a sample of this on my new test pages
at www.usernomics.com/testsite . It is the top black banner.


Okay. Probably using the ~ as a separator isn't so advisable.
The reason for wanting to hyperlink these keywords, has to do with Search
Engine Optimization. The notion is that there is extra weight assigned by
search engines to words within the body that are hyperlinked. Since the <h1>
contains all of my keywords, I thought it would not hurt anything to give it
a shot. But I don't want to destroy to look and feel of the banner.
1) What would you link it to? Circular links are *really* bad for users.

2) Even if it did work, it'd only work until the search engines caught
on. At that point, you'd go straight to the bottom of the results
list, do not pass Go, do not collect 200 new visitors. Good
*honest* markup tends to be good for search engines.

If it's a page about the things in the <h1>, then it'll show up enough
on those keywords *anyway*, other factors being equal. Be honest in
your markup both for user-focus and to avoid search engines punishing you.

In short - don't do that.
I am new to CSS so any help will be appreciated.


Look through the Google Groups archives for
news:comp.infos ystems.www.authoring.stylesheets for answers to lots of
common stylesheet questions and the occasional rare one.

Try things out, read the CSS documentation at
http://www.w3.org/TR/CSS2/, get a collection of browsers and test
things. Enjoy.

--
Chris
Jul 23 '05 #8
Bob

"Chris Morris" <c.********@dur ham.ac.uk> wrote in message
news:87******** ****@dinopsis.d ur.ac.uk...
"Bob" <ergobob@soni c[no spam].net> writes:
"Chris Morris" <c.********@dur ham.ac.uk> wrote in message
2) What on earth is it linking to? If you're using <h1> properly - for
a page title - then what does it link to? If you're using <h1> just
to get big text, then don't - use CSS to style something else to
look right.


The <h1> on each of my pages is not hyperlinked right now and describes the major topics on the page. You can see a sample of this on my new test pages at www.usernomics.com/testsite . It is the top black banner.


Okay. Probably using the ~ as a separator isn't so advisable.
The reason for wanting to hyperlink these keywords, has to do with Search Engine Optimization. The notion is that there is extra weight assigned by search engines to words within the body that are hyperlinked. Since the <h1> contains all of my keywords, I thought it would not hurt anything to give it a shot. But I don't want to destroy to look and feel of the banner.


1) What would you link it to? Circular links are *really* bad for users.

2) Even if it did work, it'd only work until the search engines caught
on. At that point, you'd go straight to the bottom of the results
list, do not pass Go, do not collect 200 new visitors. Good
*honest* markup tends to be good for search engines.

If it's a page about the things in the <h1>, then it'll show up enough
on those keywords *anyway*, other factors being equal. Be honest in
your markup both for user-focus and to avoid search engines punishing you.

In short - don't do that.
I am new to CSS so any help will be appreciated.


Look through the Google Groups archives for
news:comp.infos ystems.www.authoring.stylesheets for answers to lots of
common stylesheet questions and the occasional rare one.

Try things out, read the CSS documentation at
http://www.w3.org/TR/CSS2/, get a collection of browsers and test
things. Enjoy.

--
Chris


Hello Chris,

Thanks for the good advise. I am not trying to be tricky. Actually, I did
get some feedback that some people expected those words to be hyperlinked.
Also, they can point to other pages or anchors on the same page where the
topic appears.

I did give the CSS a tryout and you can see how I linked them at
www.usernomics.com/testsite/test.html

I will remove the ~ seperators. Now I just have to decide if I really want
to do it?

Thanks Again,

Bob
Jul 23 '05 #9
Bob

"Chris Morris" <c.********@dur ham.ac.uk> wrote in message
news:87******** ****@dinopsis.d ur.ac.uk...
"Bob" <ergobob@soni c[no spam].net> writes:
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?


Yes.

Before you do, consider two things:

1) How is the user supposed to know it's a link?
1a) How do they tell whether it's visited or unvisited?
2) What on earth is it linking to? If you're using <h1> properly - for
a page title - then what does it link to? If you're using <h1> just
to get big text, then don't - use CSS to style something else to
look right.

In a few contexts they may be unimportant. But generally it's quite
important. You probably have one where it is important - post a URL
with an example if you want that confirming.

For the how:
Use CSS. You'll need to look up 'descendant selectors' (or use
inline styles, but that's not a good idea except for testing) and the
'color' and 'background' properties.

--
Chris


Hi Chris,

You can see several pages at www.usernomics.com/testsite

I was not terribly concerned about the user in this case but if you run the
cursor over the word you do get an underline and cursor change to see it is
hyperlinked. I don't think too many people would use it but some might. It
does provide an opportunity to add hyperlinked keywords though.

A completed example is at www.usernomics.com/testsite/test.html .

Thanks a lot,

Bob
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3805
by: ziggs | last post by:
I have an asp form that has a text box called "colorBox". Just before text box is the word "Color" that is hyperlinked and will run the color.asp if pressed to show all of the colors in a predetermined 3 character code. Ex., BLU for Blue. Now, what I'd like to do is have the user enter all of the data in the main asp form, ex. Name, address, etc. When they come to the "colorBox", they will be allowed to enter "BLU" by hand or click on...
2
1174
by: Edward | last post by:
I've one datagrid and one frame with id ="frmdetail", in the datagrid, there is one template column which includes one HyperLink, <asp:HyperLink id="detaillnk" runat="server" text='detail' Target='frmdetail' NavigateUrl='someurl' ></asp:HyperLink> but when I clicked , it was shown in one new window. Thank you, wait for the answer online...
2
1779
by: Big E | last post by:
I'm using ASP.Net and SQL Server. I have a table called states. I have 2 forms. On form 1 is the 50 states in textboxes created with a loop. I want to have those 50 or 45 or whatever amount of states have a hyperlink. Once you click the hyperlink it will take the stateId from the click event and use the Get method to send it to the next page. Page 2 will simply use the browswer get method to show information based on that stateid. So my...
5
6687
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below but here is the snippet of my asp:hyperlink object; <asp:HyperLink NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta iner.DataItem,"CLIENTREF")%> ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
6
1521
by: Tina | last post by:
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it? thanks, T
3
1903
by: Raja | last post by:
I have a datagrid, it has dropdown box as a column and i have one more column that has hyperlink. The NavigateURL for the hyperlink is to open a new window with a query stirng parameter as the selected value of the drop down... here is how it looks like <asp:datagrid....> .... <asp:TemplateColumn> <ItemTemplate>
10
1940
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign a column of URLs to this hyperlink column in programming way (ie., dynamically assignment). However, I can not find a way to continue doing it. Do you have ideas about it? Thanks.
8
3797
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a System.Web.UI.WebControls.Image Control or a HyperLink and Image Controls, but the onMouseOver and onMouseOut attributes must be in the <img> tag. If I were to use the HyperLink's ImageUrl property and add the attributes using the...
10
3245
by: Matthew Wells | last post by:
Hello. I've converted a bound Access 2000 form which displays data retrieved from an Access 2000 database to an unbound form. Now my hyperlinks don't work. I'm assuming it's because the form isn't bound anymore. I didn't even have that field's data type as hpyerlink - just test. I did have the form control's "hyperlink" property set to true and it worked fine in bound mode. The fields stores paths to pdf files. How can I make the...
2
3442
by: Mike Baugh | last post by:
I am using visual studio 2005 to develop a form using c# I have 3 datagrids on one form. I can set the row color based on a certain value in a column. However this color applies to all 3 datagrida. I would like to set it so that if value of column 3 in datagrid 1 is < 100 set to red, if = 100 set to green if value of column 3 in datagrid 2 is < 90 set to red, if >= 90 set to green if value of column 3 in datagrid 3is < 80 set to red,...
0
8802
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4726
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.