Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    26
    Plugin Contributions
    0

    Default Text position with BG image in sidebox header???

    Hi.

    I'm using a bg image for my sidebox headers, placed in the css .sideboxheading, and not repeating.

    The thing is, that when trying to apply padding to place the header text properly, the pixel set height of the header expands with the value of the padding, causing gaps between header and sidebox content, and still not aligning the text right.

    I've tried to apply the padding(and margins) both in the .sideboxheadneg and the H3.sideboxheading class, but no luck.

    So far I've managed to get it looking fairly decent by setting line-height to the same value as the class height, but that is still not looking exactly the way I want.

    There has to be a way to do this, anyone with ideas please help me out.
    I'm working with the css copied from the template_default into my_template.

    Do I have to alter the tpl_box_default_left.php and add another wrapper div and put the bg image there?

    This time I'm designing for a client, but as a web designer I really want to learn to make perfectly coded and cross broser working templates for ZC.
    I have heard from a lot of peolpe that first template is a ########## to construct if you'r unfamiliar with the system and this is my fist one. Any pointers I can get I'll be very grateful.

    /Torgil - www.kabelkultur.se

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Text position with BG image in sidebox header???

    People often find this confusing. Even the programmers of Internet Explorer 5.5 got it wrong. So don't worry that you're finding it a bit difficult.

    The CSS height attribute for (for example) a sidebox heading refers not to the height of the sidebox heading block, but to the content that it contains.

    The height of the sidebox heading block is made up of top border + top padding + height value + bottom padding + bottom border. So if you add or increase the padding, you must also decrease the height to keep the sidebox heading block the same size.

    You can find out more about the CSS box model at the official W3 org box model page.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Banner - Header Position 3 .. swap image
    By wotnow in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Jul 2010, 01:25 PM
  2. Changing header image position
    By igendreau in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Sep 2009, 09:47 PM
  3. Position image in sidebox
    By Ahroo in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 5 Aug 2007, 10:28 PM

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