Extra border around thumbnail, inside of blue hyperlink border
I could use something like this, but have not been able to determine how to get it done.
The scenario:
I have a thumbnail image that is linked to its larger counterpart
I want the blue hyperlink border=1 around the thumbnail
I basically want to have a 1px white border between the blue 1px border and the thumbnail -- to set it off. It's hard to see the blue border on darker thumbnails.
Any ideas how I'd get that extra white or transparent (1 pixel) sandwiched between the 1 pixel blue hyperlink border and the thumbnail image --- WITHOUT adding the white border to the actual image? I want to do this with CODE...not an image manipulation program.
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
__________________ Vladdy | KL "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
I am having difficulties including this code in the <img> tag. Any help?
Actually, having exact example code for BOTH the <img> tag and CSS styles would be beneficial for me (and others).
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
__________________ Vladdy | KL "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
The CSS I have is as follows...but I would need to know how to simply add this to a single image as well as to all designated images (using <span class="thumbnail"></span>).
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
__________________ Vladdy | KL "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Cool. I now have two test pages. The first is thumbnail.htm and uses CSS in the <head>. The second, thumbnail2.htm, simply uses styles in the <img> tag.
Oh, to get it transparent (at least in my IE browser), I simply substituted it with #FFFFFF:
.imagelink { border: 2px solid blue; background: transparent; padding: 2px; }
I also tried adding this code to just a single image inside the <IMG> tag, but the padding is being ignored! Any clues?
See THIS PAGE.
<a href="http://www.yahoo.com"><img style="border: 5px solid blue; background-color: transparent; padding: 10px" src="2.gif" width="150" height="112"></a>
NOW....
While I (personally) only care about the IE browser, I am always interested in other browsers viewing capabilities. I generally also test my pages in N4.x and N6.x.
The thumbnail.htm page (has only one image on it) has a large portion of the padding black in N4.x and shows the whole border/padding deal scrunched towards to bottom of the image in N6.x.
The thumbnail2.htm page (2 images) has the border/padding deal in a small (separate) box below the image, but works perfectly in N6.x.
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
That's quite interesting MCookie! It does work just as it should.
Unfortunately, it's not a solution for my problem. You're declaring the image size in the CSS. The code I would need should be available to ANY image on the page so designated as a thumbnail. My images (even my thumbnails) are varying sizes. Therefore, the width/height of the images has to be given in the <img> tag.
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)
You can declare sizes and styles in any attribute or tag. I think your problem is the xhtml DTD. It won't work if you take that out. So you have to write your page in (transitional) xhtml...
So you have to write your page in (transitional) xhtml...
Nothing personal, but that's just not going to happen. This web design stuff is now a side gig, and I don' the time, etc. to move forward into anything like XHTML.
So, maybe it's just not possible (?)...certainly not for all browsers.
__________________ Gordo "In the End, we will remember not the words of our enemies, but the silence of our friends."
- Martin Luther King Jr. (1929-1968)