...

View Full Version : Html Image help



omfgandy
06-03-2009, 07:10 AM
<html>
<head>

<title>Page Title</title>
</head>
<body background="Background/edv_iframebackground.png">

<img src="Members/edv_members.png" alt="membername" style="position:absolute; top:0; left:0;>

<img src="Members/edv_members.png" alt="membername" style="position:absolute; top:100; left:384;>


<img src="Background/edv_iframebottom.png" alt="bottom" style="position:absolute; top:70%; left:0; width:753; height:300;">

</body>
</html>

This code is supposed to draw two images side by side same image starting at the top left of the screen. but it doesn't work any idea?

Genie1
06-03-2009, 11:19 AM
Hi,

Would you be able to upload a copy online, or you can post an image of how you want it to be in pain for example.

THank you

SB65
06-03-2009, 11:56 AM
This code is supposed to draw two images side by side same image starting at the top left of the screen. but it doesn't work any idea?

For starters, you haven't closed the quotes:


<img src="Members/edv_members.png" alt="membername" style="position:absolute; top:0; left:0;>

should be


<img src="Members/edv_members.png" alt="membername" style="position:absolute; top:0; left:0;">

- and the same for the other image. However, that still isn't going to have two images side by side. You are using absolute positioning here, and what it's saying at the moment in the absence of anything else on the page, is put the first image in the top left hand corner of the screen, and the second 100px down from the top of the screen and 384 px to the right. So they're not going to line up horizontally.

If you have to use absolute positioning, then your second image needs to have top:0 to line up with your first.

There are a number of downsides of using absolute positioning, not least because if you have any other content on your page, there's a good chance that your absolute positioning will overlay your other content when you don't want it to - because it'll always stay in the same place no matter what size the browser window is etc. As per Genie1's post, an link to your page or more explanation on what you're trying to do might help people suggest a better alternative.

abduraooft
06-03-2009, 12:12 PM
Also there's no unit specified in your

style="position:absolute; top:100; left:384;. There should be a px/pt/em/% unit after the value.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum