Forums / General Questions / Image Border

Image Border

Locked

Views: 1,724

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
6 Sep 2009, 7:08 PM
#1
byrd813 avatar

byrd813

Zen Follower

Join Date:
Apr 2008
Posts:
104
Plugin Contributions:
0

Image Border

I added the image border to my stylesheet, and I like it around my product images, but not on my logo image, how do I remove the border from the logo image ONLY?

Site: https://www.halosweddingfavors.com

**Halo's Ethereal Favors** - Wedding Favors, Baby Shower Favors, Baby Gifts & more!

Visit Our Blog:Halo's Favors Blog

6 Sep 2009, 8:24 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

Add this to your stylesheet:

#logo img{border:none;}

What that does is effect all the img tags inside the div #logo. You can build up specific rules like this. So, what might be better is to put the border into only the product images specifically.

Nick
iszent.com

31 Oct 2009, 1:42 PM
#3
raunharman avatar

raunharman

Zen Follower

Join Date:
Dec 2005
Posts:
165
Plugin Contributions:
0

Re: Image Border

How did you add the image border in the stylesheet?
Could you please send the exact script.

Thanks

http://www.raunharman.com
http://www.raunharman.net
Website Development, E-Book Solutions & Handicraft Exports

31 Oct 2009, 2:14 PM
#4
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

To add a border to all images the rule in the stylesheet would be:

img{
border: 1px solid #4d4d4d;
}

1px is the width of the border
solid is the style of the border
#4d4d4d is the color of the border

Nick
iszent.com

2 Nov 2009, 6:53 AM
#5
raunharman avatar

raunharman

Zen Follower

Join Date:
Dec 2005
Posts:
165
Plugin Contributions:
0

Re: Image Border

Thanks for the code.
However, when I do this, it adds a border even to the buttons. Incidentally, I have rounded buttons. Also to the logo image in the header and the bullets (images) in the category box. Have a look at http://raunharman.co.in/fashion_jewelry_store/index.php?main_page=index&cPath=8
So, this looks slightly odd.
Any help would be greatly appreciated.
Thanks.

http://www.raunharman.com
http://www.raunharman.net
Website Development, E-Book Solutions & Handicraft Exports

2 Nov 2009, 7:16 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Border

So as niccol said, you would put the border on product images only.

.categoryListBox img, .listingProductImage, .productMainImage img {border: 1px solid #4d4d4d;}
21 Dec 2009, 5:15 PM
#7
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: Image Border

I cant get this to work on my main page. the border only comes up on the specific product's info page.

http://www.thegearvault.com

indexpage is listing New Products but I can't get them to have a border there or in their category listing.

21 Dec 2009, 5:29 PM
#8
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

.centerBoxContentsNew img{
border:3px red solid
}

will do the New Products but I suspect you won't like the effect...

Likewise for the product listing:

.listingProductImage{
border:3px solid red;
}

Nick
iszent.com

27 Dec 2009, 7:50 PM
#9
jenbullfrog avatar

jenbullfrog

Zen Follower

Join Date:
Oct 2005
Location:
Helena, MT
Posts:
110
Plugin Contributions:
0

Re: Image Border

I have included the suggested css in my stylesheet and it's not working. I'm trying to add a border to every product image on the site.

27 Dec 2009, 8:20 PM
#10
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

Well, the css that Glenn posted is a good solution for all the images. If it isn't working then you may not be adding it correctly to the correct stylesheet. We'd need to see the site to let you know....

Nick
iszent.com

27 Dec 2009, 9:56 PM
#11
jenbullfrog avatar

jenbullfrog

Zen Follower

Join Date:
Oct 2005
Location:
Helena, MT
Posts:
110
Plugin Contributions:
0

Re: Image Border

this css is adding a border to some of the images, but i need a border around every product image on the site, including product info page images and additional product images, also including any product image that is in any sidebox. i'm sorry this site is on a local testing server, so i cannot provide a link. i hope someone knows the solution to this i really don't want to have to add borders to a few hundred jpgs in photoshop.

27 Dec 2009, 10:31 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Image Border

You will need to find the class or id tag that applies in each case, and change that in the stylesheet. The Firefox Web Developer extension is a good fast tool for finding this information. You can put all of these selectors in one list, and apply the border property to the whole list, similar to my post above.
Use the Web Dev "Edit CSS" button to test these one by one to make sure each selector is one you want to use.

27 Dec 2009, 10:32 PM
#13
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

The css that Glenn suggests should cover the images in product info in the default install of Zen Cart. Without a link it is hard to guess why it does not in your install.

All the images in various places can be targeted by appropriate css. You will need to find the various css rules and the best tool to work with for that task is the firefox web developer toolbar which will let you know the id and classes of elements that you wish to target.

Nick
iszent.com

27 Dec 2009, 10:33 PM
#14
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Border

There is an echo on this forum...

:smile:

Nick
iszent.com