Motoring3 mins ago
html trouble
6 Answers
when writing in html how do you know where the picture will be placed. do u need to use coordinates or something? thanks a lot
Answers
Best Answer
No best answer has yet been selected by sykosat2004. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.chazza, thats an old and out-dated technique, and (imo, and many others), very bad.
images are whats known as inline elements. this means that if you just add an image in some text, it will appear in that line of text, not on a new line
like this text here.
to make it appear on a new line, use:
<img src="">
or for the odd image, make it display as a block element (a block element is one that is put on its own line, like a new paragraph of text (this is block by default):
<img src="" style="display: block">
where the display:block stuff is called CSS, or Cascading Style Sheet.
images are whats known as inline elements. this means that if you just add an image in some text, it will appear in that line of text, not on a new line
like this text here.
to make it appear on a new line, use:
text..
<img src="">
text..
or for the odd image, make it display as a block element (a block element is one that is put on its own line, like a new paragraph of text (this is block by default):
<img src="" style="display: block">
where the display:block stuff is called CSS, or Cascading Style Sheet.
sorry.
normally, if you just place an image somewhere, it will be placed automatically by the browser somewhere. an image is an HTML tag thats known as being an "inline" tag, which means that the browser doesn't automatically put it on a new line of text to accomodate it.
if you want it on a new line, you could set it like so:
< img src="" style="display: block">
this is some CSS, that will set the image to become a block-level element, instead of an inline element. this means that it'll get put on a new line if it's, say, within a paragraph of text.
for positioning precisely, you do it with CSS too:
http://www.w3schools.com/css/css_positioning.asp
so you could write:
< img src="" style="float: right">
to make it float to the right
or
< img src="" style="position:absolute;top:0px;left:0px">
that'll make it appear at the top left of the screen. the absolute position means to take it out of the normal page order. if you want it like normal, you can set the position to relative, etc.
Basically, you can acheive image location by using CSS. see the above link [w3schools] for some decent tutorials :)
normally, if you just place an image somewhere, it will be placed automatically by the browser somewhere. an image is an HTML tag thats known as being an "inline" tag, which means that the browser doesn't automatically put it on a new line of text to accomodate it.
if you want it on a new line, you could set it like so:
< img src="" style="display: block">
this is some CSS, that will set the image to become a block-level element, instead of an inline element. this means that it'll get put on a new line if it's, say, within a paragraph of text.
for positioning precisely, you do it with CSS too:
http://www.w3schools.com/css/css_positioning.asp
so you could write:
< img src="" style="float: right">
to make it float to the right
or
< img src="" style="position:absolute;top:0px;left:0px">
that'll make it appear at the top left of the screen. the absolute position means to take it out of the normal page order. if you want it like normal, you can set the position to relative, etc.
Basically, you can acheive image location by using CSS. see the above link [w3schools] for some decent tutorials :)