Images in sidebar

Discussion in 'CSS' started by kah22, Jul 5, 2008.

  1. #1
    I wonder if there is anyone here might help me with a coding problem I'm having. I am using the following code:

    to try and place two images in a sidebar of a Wordpress Template. The sidebar.php file creates two columns, thus

    <div class="sidebar_left"> and <div class="sidebar_right">

    I'm trying to place an image in each of these columns.

    If I use the code above it looks great in my notebook, where I do my work, but when I look at it on my desktop the images run away to the right. The rightmost image is almost of the screen! I have tried deleting the "position: absolute" bit of the code but no matter how much I change the left positions they just stay in the one place

    Eventually I want to place two affiliate links in the sidebar and am just using this image for experimental purposes.

    As always any help will be greatly appreciated.

    Kevin
     
    kah22, Jul 5, 2008 IP
  2. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    First, content that appears in the sidebar is defined in the sidebar.php template. So you will have to edit it there.

    Just put images where you want them to appear such as:

    
    <img src="../../../images/stop-sign.gif" alt="Stop Sign" />
    <br />
    <img src="../../../images/stop-sign.gif" alt="Stop Sign" />
    
    Code (markup):
    And then in the stylesheet (style.css):

    
    #sidebar img {
      width:125px;
      height:125px;
      border:1px solid #333;
      }
    
    Code (markup):
    I would have to see your sidebar.php template, your website and know how exactly you want it in order to help you more specifically.
     
    risoknop, Jul 5, 2008 IP
    kah22 likes this.