On 7/10/12 12:52 PM, "Tom Livingston" <[email protected]> wrote:
>>>
>>>Add...
>>>
>>>a.nounderline {display: table;
>>>margin: 0 auto;
>>>position: relative;}
>>>
>>>...and it will center in all browsers that support positioning on CSS
>>>table.
>>>
>>>regards
>>> Georg
>>
>>
>> Thanks Georg. The problem with that is the image no longer resizes as
>>the
>> viewport gets smaller.
>>
>> Jeff
>
>
>Didn't look at the page, but have you tried display:block; and margin
>x auto x auto; ??
>
>
>--
>
>Tom Livingston | Senior Interactive Developer | Media Logic |
>ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com
Yes, Tom. I used this CSS on the container around the [two] images (the on
and off images):
#past_background div.past5 {
display: block;
margin-left: auto;
margin-right: auto;
width:60%;
}
The problem is is that I can't use that on the images because, for some
reason, I can only affect the "off" image. I can move it around, but not
the hover/on image. Obviously, they need to be positioned one on top of
the other.
Here's the code that is generated by my WP template and the image swap
plugin:
<a class="nounderline" href="http://outtacontext.com/wp2/past6">
<img width="" height=""
src="/wp2/wp-content/themes/sentence/images/past/past5_on.jpg">
<img class="himage" width="" height="" style="position: absolute; top:
0px; left: 0px; opacity: 1;" onmouseout="this.style.opacity=1;"
onmouseover="this.style.opacity=0;"
src="/wp2/wp-content/themes/sentence/images/past/past5_of.jpg">
</a>
Jeff
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/