Forums / Templates, Stylesheets, Page Layout / Spacing out text from image

Spacing out text from image

Views: 1,195

Results 1 to 14 of 14
23 Feb 2011, 10:45 PM
#1
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Spacing out text from image

Hi, my website is: https://www.LFSwear.com

If you look over on the left side, and click the category "T-Shirts" you see alot of products.

What I'm trying to do is space out the product image from the text. Can anyone help me out? :cool:

24 Feb 2011, 12:16 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Spacing out text from image

Add this to the bottom of your templates stylesheet.css file and adjust to suit

.listingProductImage {
        margin: 0em 0em 1em 0em;
        }

Zen-Venom Get Bitten

24 Feb 2011, 12:51 AM
#3
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

Did not work. :huh:

24 Feb 2011, 1:00 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Spacing out text from image

It has to if you are adding it to the correct stylesheet

Zen-Venom Get Bitten

24 Feb 2011, 3:55 AM
#5
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

I guess it was my cache. I just checked and it's changed now. :D

Thanks so much kobra! :smartalec:

26 Feb 2011, 5:31 AM
#6
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

Not sure how I didnt notice this before, but the shadow image is spaced out from the actual main image. Weird... :blink: can you help fix it?

26 Feb 2011, 2:44 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Spacing out text from image

You might try attaching it to

.listingProductImage

Zen-Venom Get Bitten

27 Feb 2011, 12:29 AM
#8
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

You mean attach it to that CSS rule you gave me from the beginning?

27 Feb 2011, 3:39 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Spacing out text from image

Yes, move it from where you have it to the bottom of the image container div
Then if too close add padding the bottom

Zen-Venom Get Bitten

27 Feb 2011, 3:43 AM
#10
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

I'm completely lost. Can you walk me through this?
I thought you meant add it to the stylesheet file.

27 Feb 2011, 3:58 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Spacing out text from image

Guess I am lost also

You have this image in your stylesheet shadow.png

.centerBoxContentsProducts {
		background:url("../images/shadow.png");
        background-repeat:no-repeat;
        background-position:center;
		padding-bottom: 3px;
		}

But it appears that you have it applied somewhere in the code and maybe that is also applied in the code

So if you determine where this is that shadow.png is besides the stylesheet then remove it and add that image as a background to .listingProductImage
Remove it from .centerBoxContentsProducts

And then if too close add padding-bottom to .listingProductImage

Zen-Venom Get Bitten

27 Feb 2011, 5:46 AM
#12
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

Well, I added the shadow image in the php for the pages: New Products, All Products, and the product info page... However, I could not figure out how to add it to the category page so I tried adding it in the CSS. Looks like it worked, but now I'm having these spacing issues.

And I sort of found a fix. If I change the line height in the CSS to 13.3 then it takes out the space, but it does squeeze everything a little bit, and I don't want to do that.

27 Feb 2011, 3:20 PM
#13
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Spacing out text from image

If you do
background: url("../images/shadow.png") no-repeat scroll 50% 45% transparent;

It works on most of your images, specially the ones with grey background, but goes a bit high on the other images, you may want to consider changing your images to be all the same, and use the % for your shadow positioning.

You could try putting the background on your .listingProductImage with some left, and right padding.

Or you could try this on your .listingProductImage
www dot css3.info/preview/box-shadow

27 Feb 2011, 5:47 PM
#14
dddmx3 avatar

dddmx3

Zen Follower

Join Date:
Jul 2010
Location:
Battle Ground, WA
Posts:
282
Plugin Contributions:
0

Re: Spacing out text from image

They all will be the same... Our company is currently in the process of taking model photos which will all be the same size.

Here's an example image: Click here to view