Web Analytics Made Easy -
StatCounter CSS image positioning - CodingForum

Announcement

Collapse
No announcement yet.

CSS image positioning

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSS image positioning

    I have this site whereby I want to put an image in a fixed positon on a site relative to the div that it is in. So I've read about it and it's not coming out the way I want it so I'm looking for assistance. What I want to do is this

    But I have this

    The code I'm using on the image in the HTML is this.
    Code:
    <div style="position:relative;"><img src="images/shani.png"  class="pos_fixed"/></div>
    The code in the CSS file is this
    Code:
        
    div.pos_fixed
    {
    /*position:inherit;*/
    position:absolute;
    top:461px;
    /*right:5px;*/
    left:0px;
    }

  • #2
    Change this:
    Code:
    div.pos_fixed
    to:
    Code:
    img.pos_fixed
    since you're applying the class to an img, and not to a div. That should get you going in the right direction.

    Dave

    Comment


    • #3
      thanks

      This helps alot!!

      Comment


      • #4
        I've gotten a solution Thanks!

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎