On 7/10/12 1:26 PM, "Tom Livingston" <[email protected]> wrote:
>> 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:
>>
>
>I don't have time to test this, but could you add a max-width on
>#past_background div.past5 of the size of the full-size image, and let
>it do the centering? So it only gets as big as the full-size image and
>stops and it's margins do the centering? Only flaw here is varying
>sized images...
>
>
>
>--
>
>Tom Livingston | Senior Interactive Developer | Media Logic |
>ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com
Hmmm, I added a max-width of 800px (which is the width of the actual image
and I think it's working!
#past_background div.past5 {
display: block;
margin-left: auto;
margin-right: auto;
width:60%;
max-width: 800px;
border: 1px solid orange;
}
But, of course, I don't understand why. And this is what bothers me with
developing a responsive design. If I create a style and it doesn't work I
play with it until it does (or end up writing this list if nothing I do
works) but I often feel like I'm striking in the dark, hoping to hit it,
if you know what I mean. -g
Thanks Tom.
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/