View Single Post
Old 10-05-2012, 07:25 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,200
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Why would you use JavaScript to do this? Isn't this a job for CSS?

Just taking a stab at it:
Code:
<div style="position: absolute; top: 915px; width: 100%; text-align: center;">
    <img ... style="margin-right: 5px;"><img ... style="margin-left: 5px;">
</div>
(tested, seems to work fine)

Of course, if the screen is too narrow to hold the two images side by side, then they will end up stacked. If it's really important to you to avoid that, then there are other CSS tricks you can use.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote