...

View Full Version : Missing Something or...



mtporter
01-17-2010, 02:07 AM
Wanting to add a image but don't want it to have any coding for the hover.

for a css style I have the following for the links:

/* Links */
a:link, a:visited {
text-decoration: none;
color: #AE855C;
}
a:hover {
border-bottom: 1px dotted #AE855C;
}
a.more-link {
padding-bottom: 2px;
font-weight: bold;
border-bottom: 1px dotted #AE855C;
}
a:hover.more-link {
text-decoration: none;


for the images I have:

/* Images */
img {
background: #FAFAFA;
border: 1px solid #DCDCDC;
padding: 8px;
}


the image goes:

#rss {
background: transparent;
border: none;
padding: 0px;
margin: 0px 0px 0px 70px;}

#rss a {border-bottom: none;}
#rss a:hover {border-bottom: none;}


should it be in a ID or class? I'm missing something

abduraooft
01-17-2010, 10:58 AM
should it be in a ID or class? I'm missing something Your query is not clear, though if you are having difficulties to understand id/class selectors, read http://htmldog.com/guides/cssintermediate/classid/

mtporter
01-17-2010, 02:11 PM
I need to turn off the text decoration off the link for the image

Excavator
01-17-2010, 04:50 PM
Hello mtporter,
It looks like border: none; should cascade to the a and a:hover. How are you adding the id rss, to the image or the anchor?

See if this works -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
font: 100% "Comic Sans MS";
background: #FC6;
}
#container {
width: 800px;
margin: 30px auto;
padding: 50px;
background: #999;
overflow: auto;
font-size: 1.8em;
}
/* Links */
a:link, a:visited {
text-decoration: none;
color: #AE855C;
}
a:hover {border-bottom: 4px dotted #AE855C;}
/* Images */
img {
background: #FAFAFA;
border: 1px solid #DCDCDC;
padding: 8px;
}
#rss {
background: transparent;
border: none;
padding: 0px;
margin: 0px 0px 0px 70px;
}

</style>
</head>
<body>
<div id="container">
<a href="">Link</a>
<a href="" id="rss"><img src="rss.jpg" alt="description" width="101" height="95" /></a>
<!--end container--></div>
</body>
</html>

mtporter
01-17-2010, 10:35 PM
here is the code that is in the header.php

I put both the id in the anchor and the image tag:

<a href="<?php bloginfo('url'); ?>/?feed=rss2" id="rss"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.png" title="Join RSS Feed" id="rss" /></a>

The stylesheet has:

#rss {
background: transparent;
border: 0px;
padding: 0px;
margin: 0px 0px 0px 0px;}
#rss a:hover {
text-decoration:none;}


Is it because I didn't have the id in both the href tag and image tag?

mtporter
01-17-2010, 10:39 PM
where do I go or how do I turn on email notifications when there are responses or replies?

Excavator
01-18-2010, 12:48 AM
Is it because I didn't have the id in both the href tag and image tag?

No, you're styling the anchor. That's where the id should go... usually anyway.
id can only be used once. Run your code through the validator once and see.

http://www.tizag.com/cssT/cssid.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum