Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Posts
    10
    Plugin Contributions
    0

    Default 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 :

    Code:
    <?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,

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  3. #3
    Join Date
    Jul 2009
    Posts
    10
    Plugin Contributions
    0

    Default 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,

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: vertical center align

    Quote Originally Posted by 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
    Code:
    #logo  {
    text-align: center;
    }
    But as this can be template specific a link to your site is the acid test
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2009
    Posts
    10
    Plugin Contributions
    0

    Default 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

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default 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"
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Vertical align of text
    By gowzel in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 27 Jun 2011, 10:20 AM
  2. Vertical align images
    By knutsford-software in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Apr 2011, 11:02 AM
  3. Vertical align additional images
    By ivanc in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Feb 2009, 02:10 AM
  4. vertical-align
    By user2345 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 May 2008, 09:16 PM
  5. Vertical Align issues?
    By SelfProduction in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 11 Sep 2007, 09:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR