Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS trouble- can anyone help?

CSS trouble- can anyone help?
Thread Tools
Senior User
Join Date: Mar 2002
Location: Chicago, IL
Status: Offline
Reply With Quote
Apr 8, 2002, 03:53 PM
 
Here is what my problems is:
I have a page that has many small images on it. They are all links, and I have a border of 1 set around them. Here is the code I'm using:

<font face = "courier">&lt;a href="ghost.html"&gt;&lt;img src="pics/ghostpre.jpg" width="50" height="38" border="1"&gt;&lt;/a&gt;</font>

also, the following .css file is linked to in the head of the document:

<font face = "courier"> BODY, P, TD { font-size: 12px;
font-family: Verdana, Geneva, Arial, sans-serif;
color: #CCCCCC;
}

A:link, A:active, A:visited{ text-decoration: none; color: #000000; border-color: #000000;}
A:hover { color: #CCCCCC;}</font>

On IE 5 and Netscaoe 6 on a Mac, this does exactly what I want: creates a thin white border around the link when it is moused over.

But I checked it out on a PC today, with IE 6, and it had the standard link color borders. No mouseover effect at all.

So I was wondering if someone here with more experience than me could give me a hint as to why this is happening. In the past I've always used Freeway or GoLive(ugh), but I just decided to teach myself HTML and CSS because I'm sick and tired of the bloated code WYSIWYG editors produce.

The site can be found at http://jimb.whyareyoulookingatme.com then in the "things to see", use the gallery link.......

I was thinking that I might need to add something to the .css file defining a style for img?

Thanks a lot for the help
Jim B.
york28@mac.com

Thanks for the help. And I apoligize for the gigantic post.

[ 04-08-2002: Message edited by: york28 ]
We need less Democrats and Republicans, and more people that think for themselves.

infinite expanse
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 8, 2002, 05:08 PM
 
A lot of browsers can be case sensitive. Keep all your CSS the same as your code (generally lowercase is a good thing).
Computer thez nohhh...
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Apr 9, 2002, 08:56 AM
 
You might also want to take the border="1" out of your HTML and move it into the CSS; the fact that you define border width in the HTML might be confusing IE6. The basic code for this is:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>a img {
border-width: 1px;
border-style: solid;
border-color: #<font color = blue>000</font>;
}</font>[/code]

Also worth noting is that in your CSS, you appear to be setting the color, not the border color, on your links when hovered. To remedy this, here's a code snippet:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>a:hover, a img:hover {
color: #CCC;
background-color: #CCC;
}</font>[/code]
(Yes, my color declarations are only three digits. You can do that if the two digits for red, green, and blue are the same for each color, i.e. #ABC is equal to #AABBCC. This is useful if you're going with the MoreCrayons palette).
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
york28  (op)
Senior User
Join Date: Mar 2002
Location: Chicago, IL
Status: Offline
Reply With Quote
Apr 9, 2002, 06:52 PM
 
Thanks for the suggestions. I'll try this tonight and see if it helps.

Jim B.
We need less Democrats and Republicans, and more people that think for themselves.

infinite expanse
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2