PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > Web Site Design > HTML/CSS/Javascript
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old 4-18-12, 10:02 PM   #1
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
I'm Stuck - Border around a linked image - not as simple as I thought?

Ok so I've googled and seen countless websites instructing the border=0 stuff and even the a img {border:none;} stuff in the style sheet.

Nothing works.

Please take a look at the social media buttons on the left column of www.pizzapie24x7.com. It seems to me that these nifty 3D icons that I'm using have transparent backgrounds which means that the actual edge of the image is larger than the 3D visible icon itself. Do you see that little gray border? It's driving me crazy!

How can I get rid of it?

I think it has something to do with the fact that its a transparent PNG. I've saved it as 8 and 24- same thing.

John

Last edited by jarigo2; 4-18-12 at 10:22 PM.. Reason: added PNG information
jarigo2 is offline   Reply With Quote
Old 4-19-12, 06:39 AM   #2
tpoynton
Custom User Title
 
tpoynton's Avatar
 
Join Date: Sep 2004
Location: Mass
Posts: 2,156
Reputation: 293
are you talking about the +1 and like buttons, or the square ones? i see the gray border around the rectangles (one of which is a div, the other is probably a div generated by js). for the square ones, I only see a little gray on the bottom right corner of two of them, something that can be easily fixed by opening the image in an editing program and erasing.
tpoynton is offline   Reply With Quote
Old 4-19-12, 08:00 AM   #3
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
Dont I look like a fool.

Either its a powweb server issue or a browser refresh issue. Last night when I was pulling my hair out trying to figure this out apparently my changes were being made but I wasn't seeing them. This morning I wake up to a bunch of changes with no gray border. Its like my server or my browser doesn't see an immediate change.

Oh I'm mad. At least the gray box is gone. It must have been one of the 100 things I tried last night with the image. oh boy.
jarigo2 is offline   Reply With Quote
Old 4-19-12, 08:13 AM   #4
snowmaker
target='_blank'
 
snowmaker's Avatar
 
Join Date: Nov 2002
Location: Not in Solomons Island.
Posts: 3,289
Reputation: 318
You know, I went to your site shortly after your post last night, and saw the border issue you were having. I was about to reply, with some things to try out (that was last night, so I don't remember what I was going to say..), but I had to run off, real life was calling (it always seems to get in the way like that, dammit), but a few hours later when I made it back here, the issue seemed resolved. It could very well be a browser cache issue, that has reared its head here in a few different ways. And that pan pizza looks good!
__________________
-bruce /* somdcomputerguy */
'If you change the way you look at things, the things you look at change.'
snowmaker is offline   Reply With Quote
Old 4-19-12, 08:31 AM   #5
tpoynton
Custom User Title
 
tpoynton's Avatar
 
Join Date: Sep 2004
Location: Mass
Posts: 2,156
Reputation: 293
must've been looking at a cached version on powweb servers...there is apparently some htaccess you can add to disable caching, sticky at http://forum.powweb.com/showthread.php?t=85763 .

Caching is bad when you are trying to see changes, but good for server performance - yours and everyone else's. If you disable caching, I'd recommend re-enabling it by commenting out those lines in the htaccess file. it is an extra step, but only takes a minute or so to open the htaccess file, add/delete comment markers, and upload.
tpoynton is offline   Reply With Quote
Old 4-19-12, 08:48 AM   #6
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
Now I'm curious as to what did the "box removal"

either my photoshop save for web options where I altered the png setting or this in my style sheet:

a:link img{
border: 0px solid #cccc99;
}
a:visited img{
border: 0px solid #cccc99;
}

I changed the px from 1 to 0. The problem is I really don't know what I'm doing! lol

Thanks anyway - its fixed, im running with it!
jarigo2 is offline   Reply With Quote
Old 4-19-12, 09:00 AM   #7
snowmaker
target='_blank'
 
snowmaker's Avatar
 
Join Date: Nov 2002
Location: Not in Solomons Island.
Posts: 3,289
Reputation: 318
Well this border: 0px solid #cccc99; translates to this: a solid border 0 pixels wide (invisible..) which is a kinda greyish yellow color (which can't be seen since the border width is 0 px anyway). Basically, the border type and color aren't needed here.

edit: oh, and the a:link and a:visited specify visited and unvisited anchors (links).
__________________
-bruce /* somdcomputerguy */
'If you change the way you look at things, the things you look at change.'

Last edited by snowmaker; 4-19-12 at 09:02 AM.. Reason: oh..
snowmaker is offline   Reply With Quote
Old 4-19-12, 09:39 AM   #8
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
A small embarrassing update: this was the fix:

a:link img{
border: 0px solid #cccc99;
}
a:visited img{
border: 0px solid #cccc99;
}

I did it on another blog of mine and the gray box was there with the same images used on the pizza site. I went into style and changed 1px to 0 px and boom it went away.

I could have saved about 3 hours last night if I would have known about the server cache issue! ha.
jarigo2 is offline   Reply With Quote
Old 4-19-12, 09:41 AM   #9
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
Quote:
Originally Posted by snowmaker View Post
Well this border: 0px solid #cccc99; translates to this: a solid border 0 pixels wide (invisible..) which is a kinda greyish yellow color (which can't be seen since the border width is 0 px anyway). Basically, the border type and color aren't needed here.

edit: oh, and the a:link and a:visited specify visited and unvisited anchors (links).
Oh just saw this reply. So you think I have some unnecessary code in there? It seems to be working fine I assume I should just leave it be? I wonder how that got in there? Oh yes, about 5 years of me screwing around with a style sheet. :-)
jarigo2 is offline   Reply With Quote
Old 4-19-12, 09:45 AM   #10
snowmaker
target='_blank'
 
snowmaker's Avatar
 
Join Date: Nov 2002
Location: Not in Solomons Island.
Posts: 3,289
Reputation: 318
It's ok to leave it there, unless you need the space the unused 30 or so characters takes up..
__________________
-bruce /* somdcomputerguy */
'If you change the way you look at things, the things you look at change.'
snowmaker is offline   Reply With Quote
Old 4-19-12, 09:46 AM   #11
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
Quote:
Originally Posted by snowmaker View Post
It's ok to leave it there, unless you need the space the unused 30 or so characters takes up..
Thanks Bruce!
jarigo2 is offline   Reply With Quote
Old 4-19-12, 09:47 AM   #12
snowmaker
target='_blank'
 
snowmaker's Avatar
 
Join Date: Nov 2002
Location: Not in Solomons Island.
Posts: 3,289
Reputation: 318
You bet man.
__________________
-bruce /* somdcomputerguy */
'If you change the way you look at things, the things you look at change.'
snowmaker is offline   Reply With Quote
Old 4-20-12, 02:48 PM   #13
entrecon
Custom User Title
 
entrecon's Avatar
 
Join Date: Aug 2006
Location: Michigan
Posts: 2,721
Reputation: 337
I don't know that you are using one, but if you have something like WordPress or Joomla they also have a cache funtionality that you might need to clear when working on this type of stuff.
__________________
________________________________
Find me on twitter: @entrecon
entrecon is offline   Reply With Quote
Old 4-21-12, 08:31 AM   #14
jarigo2
 
Join Date: Jan 2005
Location: baltimore
Posts: 111
Reputation: 5
Quote:
Originally Posted by entrecon View Post
I don't know that you are using one, but if you have something like WordPress or Joomla they also have a cache funtionality that you might need to clear when working on this type of stuff.
No, I'm doing straight .shtml files uploaded to the ftp server. So if there is a cache issue it would either be my browser or Powweb.
jarigo2 is offline   Reply With Quote
Reply

Thread Tools

Posting 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 Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:42 AM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright 2000-2007 Jelsoft Enterprises Limited.