• Hello, may anyone help me with some code problems?

    I want to move an image from my stylesheet to my header.php file, but I don’t know exactly where to put it. I tried different positions but it always wrecks my layout.

    The page is here

    Stylesheet.css

    /*** Main ***/
    
    	.main { /*width:expression(((document.documentElement.clientWidth || document.body.clientWidth) < 980)? "960px" : "100%"); min-width:980px;*/}
    
    	.main {}
    
    	.main-width { width:1014px; margin:0 auto;}
    
    	.main-bg { background:url(images/bg.gif) repeat-y 0 0;}
    
    	.header { height:255px;  background:url(images/header.jpg) no-repeat 26px 81px;}

    Header.php

    </head><body>
    <div class="main">
    <div class="main-width"><div class="main-bg">
    <div class="header">
    <div class="menu-bg">
    <div class="corner-left"><div class="corner-right">
    <div class="search">
    <div class="indent">
    <?php get_search_form(); ?>
    </div>
    </div>
    <?php
    wp_page_menu('show_home=0&sort_column=menu_order, post_title&link_before=&link_after=');
    ?>
    </div>
    </div>
    </div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • they are different files…

    php files hold infos like which image where to be and functions etc..

    css shape ur style like width, color of font background etc….

    there are no mean to move image name etc to php files from css

    if u explain better , we can help u

    Thread Starter montsemarnaucom

    (@montsemarnaucom)

    by other words

    i want to take this background image background:url(images/header.jpg) from the css to the php so i can make it linkable

    Within the <div id=”main-bg”> place an image tag with your desired image.

    E.g.

    <div id="main-bg">
    <img src="http://imagelocation.png alt="alttxt"/>
    </div>

    1. use the entire path to the image e.g. http://&#8230;.. not a relative one as the one in the stylesheet is the location of the image relative to the stylesheet, not the page.

    2. If you want to link it just surround it in an <a href=""></a> tag

    3. You may also wish to define the size of the containing div in your css to match that of your image. I.e. height: xx; width: xx;

    Thread Starter montsemarnaucom

    (@montsemarnaucom)

    thanks miocene, but still, when i put it within the <div id=”main-bg”>, the image appears above the menu. i want it to replace the actual image in the exact same place.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem with header’ is closed to new replies.