Forum Moderators: not2easy
What do I want to reach?
In the template of the page I am working on (I just started with css), I want to have an image that will have a size of 140 px (width and height).
The place where the image will appear I want to fix in the css template. The img src can be different because I want to use different images for different pages.
Thanks for the push in the right direction.
i hope this is clear?
Example:
#product /*Or whatever you want to name the id*/
{
position: absolute;
top: 50px;
left: 50px;
}
Then in your html, do this:
<img id="product" src="/image.gif">
That will result in the image being placed 50 pixels from the top and 50 pixels from the left of the screen.
I should also mention that I'm not too familiar with CSS positioning, so it's quite possible that not all of the above is accurate information. However, it should at least provide enough of a start for you to experiment from. CSS positioning can be tricky, so you might want to read up on it a bit.
Gandalf : I not want to have it like a background image. The float left is causing some effect in my right comumn.
MatthewHSE : This is probably a solution. I just want that the text will be around the image. In a way you also do when using html and align left or so. vspace and hspace. Now I do have a picture and the text starts under it.
About the effect in my right column I cannot tell you yet because I not tried to do this.
If you want text to flow around an image you will have to set a rule like this:
<p><img src="/images/logo.gif" alt"" width"" height"" style="float: left;">put some paragraph text here and it will be to the right of the image</p>
then if you want the above text by the side of the image and the rest underneath you could use a <br> tag but if you do this instead:
<p><img src="/images/logo.gif" alt"" width"" height"" style="float: left;"></p>
<p style:="clear:left;">some more text here</p>
this will make the second paragraph of text start underneath the image.
hope this helps :)