monetizer expertmobi
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

centering image with CSS problem

Discussion in 'Programming and Scripts' started by Roo, Aug 1, 2009.

  1. Roo

    Roo Affiliate affiliate

    103
    13
    0
    Hi, First post here so please be gentle on the noob!

    I'm using templates from 1234.info, but as it doesn't do exactly what I want I'm trying to hack code out of other style sheets.

    This is working to try get a 'slideshow' to display centrally. I have the background image using the div class 'slideshow' and an animated gif over this on the page code thus -

    css - /* slideshow */
    .slideshow{width:500px;height:423px;overflow:hidden;background:transparent url('../img/bg-slideshow.jpg') no-repeat 0 0}.slideshow img{height:423px;}

    pagecode -
    <div class="slideshow">
    <img class="center" src="./img/test.gif" alt="text?" width="500" height="439" /></a>
    </div>

    Though I can get the gif to align center, I can't shift the background or even keep the gif aligned center when activating the slideshow div.

    Any help to center this as it's been sending me around in circles for the last 24hours!

    TIA
     
    4 people like this.
  2. monetizer
  3. Roo

    Roo Affiliate affiliate

    103
    13
    0
    wow! Not a single answer in over 6 weeks! And here's me with another CSS question....
     
  4. silverf0x

    silverf0x Affiliate affiliate

    32
    0
    0
    your image with class center.

    You may try to create css for .center

    .center {float:center;margin:auto;}

    Hope that it can help you. Please tell me the result
     
  5. misamisa

    misamisa Affiliate affiliate

    5
    0
    0
    float:center is not supported for many modern browsers. instead use {position:relative;margin:0 auto;}

    Hope this works.
     

Featured Resources (View All)

MI