Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / image alignment - centerBoxHeading

image alignment - centerBoxHeading

Locked

Views: 927

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Jul 2008, 12:07 PM
#1
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

image alignment - centerBoxHeading

I would like to place this image in the centerBoxHeading position so that the text (New Products For July, Featured etc) sits centered in between. I have been able to succesfully generate the image in place with this modification in the stylesheet.css:

h2.centerBoxHeading {
margin:5px auto;
padding:.5em 0;
text-align:center;
border:1px solid #bababa;
line-height:normal;
width:100%;
background-image: url(../images/centerbox.gif);
}
However, the image is not centered and therefore sits on top of existing text and looks unsightly. (Now that I think about it, it seems to repeat.)

Any thoughts on how to center this image?

Thanks!!
FYI - This is for the ItalianGlassConnection_1.3.8a site below, although I have since removed the offending image.

17 Jul 2008, 10:15 AM
#2
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: image alignment - centerBoxHeading

You could try this:

.centerBoxHeading {
    background-image: url(../images/centerbox.gif);
    background-position:center;
    background-repeat:no-repeat;
   }
```Leave off the H2 as that is for the text I think lol
17 Jul 2008, 12:09 PM
#3
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: image alignment - centerBoxHeading

christon26:

You could try this:

.centerBoxHeading {
background-image: url(../images/centerbox.gif);
background-position:center;
background-repeat:no-repeat;

}


It worked beautifully but only *with* the H2 (h2.centerBoxHeading) - Thanks for your help!
17 Jul 2008, 7:21 PM
#4
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: image alignment - centerBoxHeading

lol strange that, I guess sometimes it works with one and sometimes with the other, mine I have the background with just the .centerBoxHeading but I am glad it worked for you either way LOL :D