Posted: Sat Jan 10, 2009 5:08 pm Post subject: Changing the display placement of an image
Alright, this is my first html post, as I am brand-new to it, so after about a day of practice (xD) I've only hit one wall for my site. How do I change the placement of an image from the left side of the screen to the centre?
If you meant for him to read about the align property, also read that it's deprecated. If he's asking now, may as well give him the full answer.
To the original poster:
The proper way would be to use CSS. You said you're new, so I won't bother you with details like in-line vs. external style sheets and whatnot, but definitely have a look about that later. For the moment, though, try this to get you started:
code:
<img style="float:right" src="whatever.gif" />
I'm skipping a lot of detail there, though - read up on CSS, and the float property specifically, in more detaile.
saltpro15
Posted: Sat Jan 10, 2009 8:42 pm Post subject: RE:Changing the display placement of an image
ok, i know Turing and C++ but no html so thanks for your help
jbking
Posted: Mon Jan 12, 2009 2:10 pm Post subject: Re: Changing the display placement of an image
Another way to go would be to use a div tag around the image so the html would be something like this:
Yeah, that's perfectly valid as well. Personally, I think it depends on the context - I'd set it to float in the CSS if it were an image to (for example) just be in the same body of content as text (such as an illustration in a long article), and use a div tag with the text-align property if it were a more "standalone" image, something to be treated as a main part of the page by itself.