• Advertisement
Sign in to follow this  

[web] Trouble with CSS and new site

This topic is 4826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I am writing a simple web page to show my work. I already know HTML and decided to give CSS a try. I had done one other simple page using CSS (sorta). The problem is, in my header div, I have a picture that is a link to the home page. The picture has a 'border' around it because it is a link. How can I get rid of this? My Site I have three divs, a header, a Menu, and a Contents area. I have written the CSS for the link tag as so:
a {
	color:#ccc;
	font-size:11px;
	text-decoration:none;
	font-weight:550;
	font-family:verdana, arial, helvetica, sans-serif;
	}
a:link {color:#ccc;}
a:visited {color:#c9c;}
a:hover {background-color:#0F0;}

I tried this to fix the problem with the header:
#Header > a {
	color:#ccc;
	font-size:11px;
	text-decoration:none;
	border:0px;
	border-color:transparent;
	font-weight:normal;
	font-family:verdana, arial, helvetica, sans-serif;
	}
#Header > a:link {color:#ccc;}
#Header > a:visited {color:#ccc;}
#Header > a:hover {background-color:transparent;}

This doesn't seem to be working. I am doing it right? Am I totally stupid and should stick to game programming?

Share this post


Link to post
Share on other sites
Advertisement
To get rid of borders around images, use this rule:

a img { border: none; }

The fix you have on the header doesn't work in IE, since IE doesn't support ">" in selectors. Just use:

#header a { ... }
#header a:hover { ... }
...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement