How frustrating it is to try to position an image with html. With a css (cascading style sheet) you can position right down to the pixel where you would like your image positioned.
To position a picture exactly out from the top and left side you need to add code to the < head > part of the html document as well as to the < body > part.
Add in the heading:
< style type=”text/css” >
#anyname { position: absolute; top: 0px; left: 0px; }
< /style >
The top: 0px; left: 0px; is the number of pixels from the top and left of the browser window. If you wanted it to be 30 pixels down and 40 over you would change these to 30px and 40px
Add in the body:
< span id=”anyname” > < img src=”picture.gif” >
< /span >
If you forget the closing tags most browsers won’t even load the page. If you forget the semi-colons they will ignore what you have told them.
See also:
Beginner’s tips for CSS
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.