Link to home
Start Free TrialLog in
Avatar of dkloeck
dkloeckFlag for Spain

asked on

vvveasy center image

i'm a very bloody n%b in this,
I just want to center an image horizontal & vertical acording to the window size
nothing else is on the page
Avatar of seanpowell
seanpowell
Flag of Canada image

If it's the only thing on the page, then use the CSS background property:

<html>
<head>
<style type="text/css">
<!--
body {background-image: url(myimage.gif); background-position:center center; background-repeat:no-repeat; }
//-->
</style>
</head>
<body>
</body>
</html>
Avatar of dkloeck

ASKER

but the image is a link to another page, isn't there another way?
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kane00
Kane00

You can use this code. It is simply a table!

<html>

<head>
<title>Example</title>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">

<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" height="100%">
      <tr>
            <td style="text-align: center">
            Place your image here, with the links and everything.
            </td>
      </tr>
</table>

</body>

</html>