SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    slight problem with image replacement

    Hi there,

    Im using this image replacement technique:

    Code:
    span.blog {
    
    background: transparent url(/textpattern/images/23.gif) no-repeat;
    
    position: absolute;
    
    top: 0;
    
    left:0;
    
    margin-top: 0px;
    
    width: 150px;
    
    height: 50px;
    }
    
    <h2>wblog<span class="blog"></span></h2>
    Im using it within a liquid layout so i dont want absolute positioning, but this is the only way i can get the image to appear. If i stick a relative in there the image disappears.

    could anyone tell me why and how to get this working within a liquid layout?

  2. #2
    Guru Meditation Error gnarly's Avatar
    Join Date
    Dec 2003
    Location
    Cheltenham, United Kingdom
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you set the h2 to position: relative; then span.blog will be positioned absolutely, relative to the h2 (if you see what I mean).

    This technique enables you to combine positioning with a liquid layout quite successfully.
    Olly Hodgson
    thinkdrastic.net

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello Mr Gnarly,

    Nice one for that. I knew i was missing something but could'ne put my finger on it!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •