"Zeke Koos" <ze******@softhome.net> schreef in bericht
news:e5**************************@posting.google.c om...
Headless <in*************@dna.ie> wrote in message
news:<ia********************************@4ax.com>. ..
ze******@softhome.net (Zeke Koos) wrote:
<body>
<div style="position:absolute; left:0px; top:0px; width:780px;
height:42px; ">
<img src="images/CW---Webpage_01.png" width=780 height=42>
</div>
<div style="position:absolute; left:0px; top:42px; width:52px;
height:488px; ">
<img src="images/CW---Webpage_02.png" width=52 height=488>
</div>
</body>
How do I make this appear in the center of the page so it will
work ondifferent screen widths. I know you can do it with tables, but
I'dlike to use CSS.
<head>
<style type="text/css">
img.class{display:block;margin:0 auto}
</style>
</head>
<body>
<img src="img1.png" width="780" height="42" class="class" alt="">
<img src="img2.png" width="52" height="488" class="class" alt="">
</body>
Use suitable alt content, name the class appropriately, make sure
IE is not in quirk mode.
That does not work with absolutely placed images, thanks for
replying though :)
I couldn't read your original post anymore, so I'm guessing at what
you want to achieve,
but if I understand it right, you could use the following code:
<body>
<div style="width:780px; margin-right:auto; margin-left:auto;
margin-top:0px; padding:0px; text-align:left;">
<div style="position: relative; top: 0px; left: 0px;">
<div style="position:absolute; left:0px; top:0px;
width:780px;height:42px;"><img src="images/CW---Webpage_01.png"
width=780 height=42></div>
<div style="position:absolute; left:0px; top:42px;
width:52px;height:488px;"><img src="images/CW---Webpage_02.png"
width=52 height=488></div>
</div>
</div>
</body>