Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / vertical center align

vertical center align

Locked

Views: 1,259

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
10 Jul 2009, 1:06 PM
#1
pokemon3d avatar

pokemon3d

New Zenner

Join Date:
Jul 2009
Posts:
10
Plugin Contributions:
0

vertical center align

Hello,

This is my first post on this forum, I have already used the search function many times since I have started to use zencart, but I can't find answer to this one :

I would like to add the property align="absmiddle" to an image for having the following text vertically centered, but I am stalled trying to insert this property into the below line :

<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>

Thanks a lot in advance for your help,

10 Jul 2009, 2:17 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: vertical center align

The preferred way to affect layout details is with CSS rather than hard-coded HTML.

If this is the site logo you are trying to style, it has an id already. Look for #logo in your stylesheet (/includes/templates/your_template/css/stylesheet.css). If it is not already in a rule by itself, separate it from the other selectors, and style as desired. CSS alignment syntax is different from HTML which is what you appear to be familiar with.
With a link to your site and a description of what you want to do, we can give the exact styling to apply.

10 Jul 2009, 2:27 PM
#3
pokemon3d avatar

pokemon3d

New Zenner

Join Date:
Jul 2009
Posts:
10
Plugin Contributions:
0

Re: vertical center align

Thanks very much for your prompt answer.

Per your recommendations, I will try to use the stylesheet to apply the absmiddle property (if it is possible), and will let you know the results.

My shop is not yet active (although uploaded on a server already), because I have to finalize the company start-up.

Thanks again,

10 Jul 2009, 3:27 PM
#4
kobra avatar

kobra

Black Belt

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

Re: vertical center align

pokemon3d:

Per your recommendations, I will try to use the stylesheet to apply the absmiddle property (if it is possible), and will let you know the results.
I do not see where "absmiddle" was recommended
Usually for the logo to be centered one would use

#logo  {
text-align: center;
}

But as this can be template specific a link to your site is the acid test

12 Jul 2009, 7:38 PM
#5
pokemon3d avatar

pokemon3d

New Zenner

Join Date:
Jul 2009
Posts:
10
Plugin Contributions:
0

Re: vertical center align

Thanks a lot for your suggestions, I finally did it with CSS stylesheet, but changed a bit the layout from "text beside icon" to "text under icon".

Both recommendations did help me a lot.

Regarding the align:absmiddle, I found it somewhere on this tutorial site : http://www.w3schools.com/

Again thank you
p3d

12 Jul 2009, 8:32 PM
#6
kobra avatar

kobra

Black Belt

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

Re: vertical center align

Regarding the align:absmiddle, I found it somewhere on this tutorial site :
Did not say that it was not a valid setting just that I did not see where it was "recommended"