2 of 2
2
RE : Image underline links & how to remove them?
Posted: 22 May 2008 07:29 AM   [ Ignore ]   [ # 19 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008
Andy Harris - 22 May 2008 07:12 AM

The code should be:

<div id="img"></div>

But yep, that’d work fine. Though if you’re using it more than once on a page you should change it to a class (<div class=“img”> rather than <div id=“img”>).

Otherwise cool!

I tried this div class=img but if I want to line up say, the podcast icon along with the rss icon, separated by a nbsp, I still need two divs! I thought div took care of all that was within it?

<div class="img"><a href="http://www.mydomain.com/blogaddress/feed.xml"><img src="images/rss.gif" class="img" width="24" height="24" border="0"></a></div>&nbsp;<div class="img"><a href="http://www.nhtaxpayerradio.com/feed.xml"><img src="images/podcast.gif" class="img" width="24" height="24" border="0"></a></div>

Profile
 
 
Posted: 22 May 2008 07:37 AM   [ Ignore ]   [ # 20 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008

OK now this:

img {a:hover: text-decoration:none; background-color:transparent; border-bottom: none;}

This seems to work, even with no div, and simply class=“img” on each, but the MOMENT I put a space between the two images, whether just a return, or a nbsp, then the line comes back (but not the hover color)


rolleyes

Nothing like going to bed with a problem then waking up with it again. LOL

Profile
 
 
Posted: 22 May 2008 07:37 AM   [ Ignore ]   [ # 21 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  810
Joined  02-15-2008

Again I’m unsure of what you’re trying to achieve with it, but div is a block element which means it’ll take 100% width allowed to it. If you’re looking to place things next to each other (and I presume you mean side by side), this would work:

<div class="img"><a href="http://www.example.com/blogaddress/feed.xml"><img src="images/rss.gif" class="img" width="24" height="24" border="0"></a>&nbsp;<a href="http://www.nhtaxpayerradio.com/feed.xml"><img src="images/podcast.gif" class="img" width="24" height="24" border="0"></a></div>

You could then target the image with:

div.img img{}

Alternatively, you have the class on the images too, so you could use:

img.img{}

Which would do the same as the above.

If it’s the hover state you’re after, use:

div.img a:hover{}

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 22 May 2008 07:46 AM   [ Ignore ]   [ # 22 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008
Andy Harris - 22 May 2008 07:37 AM

Again I’m unsure of what you’re trying to achieve with it, but div is a block element which means it’ll take 100% width allowed to it. If you’re looking to place things next to each other (and I presume you mean side by side), this would work:

<div class="img"><a href="http://www.example.com/blogaddress/feed.xml"><img src="images/rss.gif" class="img" width="24" height="24" border="0"></a>&nbsp;<a href="http://www.nhtaxpayerradio.com/feed.xml"><img src="images/podcast.gif" class="img" width="24" height="24" border="0"></a></div>

Yes that’s exactly what I have that won’t work…I even tried adding a trans. section to make the graphic bigger and even that messed it up!

Andy Harris - 22 May 2008 07:37 AM

You could then target the image with:

div.img img{}

Alternatively, you have the class on the images too, so you could use:

img.img{}

Which would do the same as the above.

If it’s the hover state you’re after, use:

div.img a:hover{}

I’ll try this last thing. After that, if it doesn’t work, I’m giving up.

grin

Profile
 
 
Posted: 22 May 2008 07:49 AM   [ Ignore ]   [ # 23 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008

EUREKA!!!!!!!!!!!! grin grin grin

div.img a, a:hover, a:active {text-decoration:none; background-color:transparent; border-bottom: none;}


And the string with the

&nbsp;

between it is there and works…

THANK YOU GUYS!!!!!!!!!!!!

(I had to add a, and active AS WELL AS hover to get rid of the attributes of the text links…)

Profile
 
 
Posted: 22 May 2008 07:54 AM   [ Ignore ]   [ # 24 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  810
Joined  02-15-2008

Hmm. I’m not sure that works as you want it to because as soon as you include a comma, you’re starting a new rule. This is what you probably should be using, but if it works as it stands then it’s good I guess.

div.img a, div.img a:hover, div.img a:active {text-decoration:none; background-color:transparent; border-bottom: none;}

 Signature 

Andy Harris | Pepper Digital | Malvern, UK | Twitter | New to ExpressionEngine? Start here!
Remember - If at first you don’t succeed, you’re not Chuck Norris

Profile
 
 
Posted: 22 May 2008 07:57 AM   [ Ignore ]   [ # 25 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008

Screen shot (I have to get a better podcast icon but at least I can see this works with the two little icons in the upper nav. Linking graphics I don’t do often, but I needed these two)

Image Attachments
website.gif
Click thumbnail to see full-size image
Profile
 
 
Posted: 22 May 2008 08:00 AM   [ Ignore ]   [ # 26 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008
Andy Harris - 22 May 2008 07:54 AM

Hmm. I’m not sure that works as you want it to because as soon as you include a comma, you’re starting a new rule. This is what you probably should be using, but if it works as it stands then it’s good I guess.

div.img a, div.img a:hover, div.img a:active {text-decoration:none; background-color:transparent; border-bottom: none;}


No YOU ARE CORRECT… I had to make a div.img for each like so, but still I’m happy happy!

div.img a{text-decoration:none; background-color:transparent; border-bottom: none;}
div
.img a:hover{text-decoration:none; background-color:transparent; border-bottom: none;} div.img a:active{text-decoration:none; background-color:transparent; border-bottom: none;}

I can now have my text underline, active, and hover, and my images as links with no junk, and my cake, and eat it too! LOL

I don’t use linked images often, but I wanted that rss icon…wahhh, it’s much cooler than just saying “here’s ma feed” and give a link.

grin

Profile
 
 
Posted: 22 May 2008 12:46 PM   [ Ignore ]   [ # 27 ]  
Summer Student
Total Posts:  11
Joined  05-21-2008

What is your recommendation for a good book or two for me to learn CSS from the ground up? (CSS for Dummies?) I know HTML from the first version up to 4.x because I read several books on it.. and at the time there were lots of different things that worked in IE and not Netscape, but now I’m coding for Safari, FireFox, etc…and they are more universal these days.

I would love to get my head straight on what all the dots, semicolons, and hash signs mean.
I’ve been tweaking a lot of blog software and there are words in there I don’t know.. like wrapper… etc.

I prefer to hand code all my sites as this one.

Profile
 
 
Posted: 22 May 2008 03:28 PM   [ Ignore ]   [ # 28 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  04-03-2008

I found CSS: The Missing Manual to be pretty good.

Profile
 
 
   
2 of 2
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62610 Total Logged-in Users: 17
Total Topics: 77108 Total Anonymous Users: 8
Total Replies: 416361 Total Guests: 126
Total Posts: 493469    
Members ( View Memberlist )
Newest Members:  redarcEbbyWolfCIfan1000grayskwrlcornernotetriplexwengbaoshanGenki1gabewellsGlauco