WordPress.org

Ready to get started?Download WordPress

Forums

Left.php to Float off of Content? (4 posts)

  1. luxechandelier
    Member
    Posted 4 years ago #

    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!

  2. Dagon Design
    Member
    Posted 4 years ago #

    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)

  3. luxechandelier
    Member
    Posted 4 years ago #

    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?

  4. Dagon Design
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags