Forums / Templates, Stylesheets, Page Layout / offsetting the text from the images

offsetting the text from the images

Locked

Views: 1,688

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
25 Jun 2007, 12:56 PM
#1
jen_boxer avatar

jen_boxer

New Zenner

Join Date:
Jun 2007
Location:
sydney
Posts:
14
Plugin Contributions:
0

offsetting the text from the images

I don't like how close the text captions (names) appear under my products pictures... can you help tell me where in my code and what do I put to make this show slightly further apart?

http://cart.nellifant.com/

here is an example...

25 Jun 2007, 7:36 PM
#2
kobra avatar

kobra

Black Belt

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

Re: offsetting the text from the images

For the page you referenced try this and adjust as required: First see if you have this in the css and seperate if necessary and if not just add it:

img {
padding-bottom: 2em;
}

Zen-Venom Get Bitten

2 Jul 2007, 5:29 AM
#3
jen_boxer avatar

jen_boxer

New Zenner

Join Date:
Jun 2007
Location:
sydney
Posts:
14
Plugin Contributions:
0

Re: offsetting the text from the images

thanks for your help... I can't find this in my styleshhet so far... so where do I add it in to make my product listings and prodect information have more paddding???

2 Jul 2007, 5:58 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: offsetting the text from the images

There is a section of your stylesheet labeled /Image Display/ ...

#productListing a img {
margin-bottom: 1em;/or whatever you want/
}
#productMainImage img {
margin: 1em 0em 1em 0em ;
}

#productAdditionalImages img {
margin: 1em 0em 1em 0em ;
}

3 Jul 2007, 9:58 AM
#5
jen_boxer avatar

jen_boxer

New Zenner

Join Date:
Jun 2007
Location:
sydney
Posts:
14
Plugin Contributions:
0

Re: offsetting the text from the images

this is now what that section of my stylesheet looks like... yet however nothing seems to be changing at all..

I don't know whats up.

I am stumped. This is the stylesheet.css that is housed in my includes isn't it???

what is up????

Or am I just a big dunce?

/Image Display/

#productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage {
margin: 6em 1em 1em 6em ;

}

#productListing a img {
margin-bottom: 4em;/or whatever you want/
}
#productMainImage img {
margin: 6em 0em 1em 6em ;
}

#productAdditionalImages img {
margin: 6em 0em 1em 6em ;
}

3 Jul 2007, 11:25 AM
#6
kobra avatar

kobra

Black Belt

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

Re: offsetting the text from the images

Make sure that you are editing this file includes/templates/classic/css/stylesheet.css

And as I first posted find seperate or just add this:

img {
padding-bottom: 2em;
}

I did this on the page you posted using FF & the web dev tools and it works

Zen-Venom Get Bitten

3 Jul 2007, 11:48 AM
#7
jen_boxer avatar

jen_boxer

New Zenner

Join Date:
Jun 2007
Location:
sydney
Posts:
14
Plugin Contributions:
0

Re: offsetting the text from the images

ok I was working on the wrong Css stylesheet so now I am on the correct one.

I now have this:

/Image Display/

#productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage {
margin: 1em 1em 1em 1em ;

}

#productListing a img {
margin-bottom: 1em;/or whatever you want/
}
#productMainImage img {
margin: 1em 1em 1em 1em ;
}

#productAdditionalImages img {
margin: 1em 1em 1em 1em ;

and I need a bit more info so I can get it right...

ie: is this top/left/right/bottom???1em 1em 1em 1em ;

ot what order?

Currently in my product desriptions the heading is sitting higher than the image.

The caption here is now OK but in the column view ( and small examples below it new products) the captions are still sitting too close to the images)

the small amount of code you suggested I add... I can't find any reference to in my sheet so I don't know where to make the correction? or add it?

sorry I am quite new to all this

3 Jul 2007, 1:23 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: offsetting the text from the images

img {
padding-bottom: 2em;
}
will affect all images on your site which do not have specific instructions. If that is ok, just add this to your stylesheet, all by itself near the top. I think 1em looks a bit better than 2em, but that's your call. So far you appear to have no images on your site that are not captioned product images, so this may work just fine.

The four-part spec goes top-right-bottom-left (clockwise).

3 Jul 2007, 5:54 PM
#9
kobra avatar

kobra

Black Belt

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

Re: offsetting the text from the images

Glen,

Using FF & the WDT, I used your code and there was no spacing??

I think that margin here should be padding??

Zen-Venom Get Bitten

9 Jul 2007, 7:43 AM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,844
Plugin Contributions:
17

Re: offsetting the text from the images

margin gives space outside a border while padding gives space inside. It's hard to see any difference in how the two effect text in a div if there is no border around the div.
http://www.redmelon.net/tstme/box_model/ is a good look at the differences.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com