WordPress.org

Support

Support » How-To and Troubleshooting » help with css and header.php image positioning please

help with css and header.php image positioning please

  • I am trying to get my header to look a little different. I have been experimenting but haven’t been able to achive the desired look. I have changed attributes in both the header.php file and the style.css file. Currently it looks like this: http://www.divaknitting.com/blog there are several components to the header…right, left and title using z-position attributes. I would like for the title to be centered both horizontally and vertically. The current code is this in the header.php file:

    <!– START HEAD –>
    <div id=”head”>
    <div id=”head-left”></div>
    <div id=”title”>“><img src=”<?php bloginfo(‘template_directory’); ?>/images/title.gif” width=”290″ height=”75″ alt=”<?php bloginfo(‘name’); ?>” title=”<?php bloginfo(‘name’); ?>” /></div>
    </div>
    <!– END HEAD –>

    I tried adding align=”center”, =”middle” =”absmiddle” and none of these worked…it stays aligned leftand bottom.

    Here is the CSS code regarding the title:

    #title { position: absolute; z-index: 2; top: 160px; left: 0px; width: 290px; height: 75px; margin: 0px; padding: 0px; }

    I also tried different align and relative position here to no avail…I also changed “left” to “center” and middle but no dice. Here is the code for the two other elements of the header if that helps:

    #head { position: relative; height: 260px; background-image: url(images/head-girl.jpg); background-repeat: no-repeat; background-position: top right; }
    #head-left { position: absolute; z-index: 1; width: 130px; height: 250px; top: 0px; left: 0px; margin: 0px; padding: 0px; background-image: url(images/head-left.jpg); background-repeat: no-repeat; }

    both come before #title.

    I appreicate any help, thanks!

  • The topic ‘help with css and header.php image positioning please’ is closed to new replies.