|
Posted by Jonathan N. Little on 10/23/06 16:26
RigasMinho wrote:
> Hello,
> I have this issue where somehow i want the first image to be placed all
> the way on the left part of the screen.
>
> While the 2nd image has to be placed a little bit to the right side of
> the left margin.
>
> I cant seem to get it to work:
> <body style="margin-left:50;margin-right=50" >
#1 50 what? With CSS you must specify the *units* for most lengths, 50px
a assume?
> <img src="test.GIF" />
> <img src="test2.jpg" />
#2 images are inline not block element by default so by your markup
test2.jpg would follow to the right of test.GIF
>
> If i change teh body style to "margin-left:0;
> then it aligns both pictures to the left.
>
> I only want the first picture aligned to the left but cant get the
> second picture to align someplace else.
Yes, give it a different style, In HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/stylesheet">
BODY { margin: 0 50px; }
.hugLeft { margin-left: -50px; }
.offsetLeft { margin-left: 20px; }
</style>
</head>
<body>
<div class="hugLeft">
<img src="text.GIF" alt="test1">
Should hug the left side of window
</div>
<div class="hugLeft">
<img src="text2.jpg" alt="test2">
Should be 70px offset from side of window
</div>
<p>
Standard 50px margin for page....
</p>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|