Support » Themes and Templates » Left.php to Float off of Content?

  • I’m trying to add an image to float off of the content in left.php. I tried setting the margin numbers but I noticed that if I re-size my Internet browser it doesn’t stay with the content and other pictures. How can I get it to stay like the right.php column is attached to the content right now?

    http://www.luxechandelier.com

    My CSS code for the left image:

    /* left image */
    
    #leftimage {
                 position: absolute; 
    
                 float: left; 
    
                 margin-left: 0;
    
                 margin-top: 140px;
    
    	    padding: 0;
    
                 width: 97px; 
    
                 height: 263px; 
    
                 background: url('http://luxechandelier.com/wp-content/themes/luxechandelier/images/content.png') no-repeat;
    }

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I took a look at the site, but I did not see the image. If you can add it back, it will be easier to figure out.

    One thing – If you are using absolute positioning, you do not need to use float, but you do need to use positioning declarations like top, left, etc..

    Try something like this:

    #leftimage {
      position: absolute;
      top: 140px;
      left: -97px;
      width: 97px;
      height: 263px;
      background: url('http://luxechandelier.com/wp-content/themes  /luxechandelier/images/content.png') no-repeat;
    }

    If that doesn’t work, then if you can add the image back I can give a better answer (since I can see exactly how you are using it, and edit the page cache directly to experiment)

    I got it to work doing what you told me to do, but the left had to be adjusted to 50px;

    Also I noticed that when I re-size my window the image does not move/resize with the whole blog. Do you know how to make it stick with the blog at all times?

    Try assigning the div wrapped around your main site body this (perhaps the container div):

    position: relative;

    That will force the divs ‘inside’ it to position themselves relative to the body.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Left.php to Float off of Content?’ is closed to new replies.