The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

centering image with CSS problem

Roo

New Member
affiliate
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
 
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
 
float:center is not supported for many modern browsers. instead use {position:relative;margin:0 auto;}

Hope this works.
 
MI
Back