Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css problem

Status
Not open for further replies.

VBmim

Programmer
Joined
Jun 25, 2001
Messages
361
Location
BE
Hello everyone!!

I am building a website where I build (with asp) a list of helmets(different models and different colors). Every helmet is a link. When you go over the link with your mouse, you can see a picture of the helmet. This picture itself is also a link. So if you want to see the details of the helmet, you can click on the name of the helmet or you can click on the picture.
I declared in CSS that my links should be in a red color, and that the img-link should be in a black color. Nothing wrong with my links, but the border around my picture is staying blue (and violet if visited).....
Here is some code

The definitions for the image link
Code:
A.imgLink:active
{
    COLOR: black;
    TEXT-DECORATION: none
}
A.imgLink:link
{
    COLOR: black;
    TEXT-DECORATION: none
}
A.imgLink:visited
{
    COLOR: black;
    TEXT-DECORATION: none
}
A.imgLink:hover
{
    COLOR: black;
    TEXT-DECORATION: none
}
definitions for the normal links
Code:
A.HelmLink:active
{
    COLOR: #cc3300;
    FONT-SIZE: 9pt;
    TEXT-DECORATION: underline
}
A.HelmLink:link
{
    COLOR: #cc3300;
    FONT-SIZE: 9pt;
    TEXT-DECORATION: none
}
A.HelmLink:visited
{
    COLOR: #cc3300;
    FONT-SIZE: 9pt;
    TEXT-DECORATION: none
}
A.HelmLink:hover
{
    COLOR: #cc3300;
    FONT-SIZE: small;
    TEXT-DECORATION: underline
}
this is the image link
Code:
<a class=imgLink name=imgLink id=imgLink><IMG alt=Voorbeeldje height=223 id=voorbeeld border=2 src=&quot;images/background4.jpg&quot; name=voorbeeld width=230  onerror=&quot;document.voorbeeld.src=NoPicture.src;&quot;</A><br>

I am changing the href of my image link with javascript. Here is an example
Code:
<a target=_parent class=&quot;HelmLink&quot; href=&quot;helmtest.asp?pid=69&quot; OnMouseOver=&quot;parent.document.all['imgLink'].href='helmtest.asp?pid=69'; parent.document.voorbeeld.width=226;parent.document.voorbeeld.height=219; changeImage(picArray[0].src);&quot;>Zwart</a>


Can anyone help me?

tnx!

Mim
 
Hi VBmim,

try:
<IMG border=0 alt=Voorbeeldje

Sorry for the others to speak some dutch:
Leuk om af en toe Nederlandse voorbeelden te zien LOL,

Erik


<!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
boomerang, ich spreche nicht deutsch ;(
 
I78jo,

This is no offense, I only want to explain it to you :-)

1) I said Sorry for the others to speak some dutch: That means that I appoligize for the rest of the forum to take the change to say something to another member in my own language.

2) I'm definitively NOT Deutsch.
I said Dutch:

deutch = Germany
dutch = The Netherlands (or Holland)

This is also not offencive to the German members :-)
I have a lot of German boomerang-friends and they are the best boomerangers of the world.

3) I think you do speak &quot;deutsch&quot; because my German spelling-cheker approved this sentence &quot;ich spreche nicht deutsch&quot; Well done !! LOL

Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
no worries man :) i'm learning deutsch, i'm a beginner :p ... it's good to learn languages. keep laughing man [pipe]
 
hi there!

thanx for all the (funny) replies!

That trick with border=0 will certainly work, but I want that border around my picture...

enne, ook in België spreken ze dutch :-)

anywho, I allready solved my problem... all I had to do is declare this in my body tag

Code:
<body alink=black link=black vlink=black>

That's it! ridiculous, isn't it? :-)
The border of my picture is black and the rest stays red!

voila!
 
Hi VBmim,

oops, sorry that I didn't read the question carefully. Now I understand that you will keep the border.

Watch out with <body alink=black link=black vlink=black> because that will set the black color for ALL your links on that page. So if you will add a normal link (<a href=&quot;blabla&quot;>to blabla</a>) afterwards this will be always black.

I suggest you add a style to the IMG:

------style definition---------

.img1
{
border:solid 3px black;
}

------ end style definition---------

<a class=imgLink name=imgLink id=imgLink><IMG class=&quot;img1&quot; alt=Voorbeeldje ......

BTW: I like the Belgium accent verry much :-)

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top