You are viewing our Forum Archives. To view or take place in current topics click here.
HTML Image moving help?
Posted:
HTML Image moving help?Posted:
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
(Yes i just started yesterday) Whats the code to move an image to the centre in HTML. I know the code to move text around the page, and <p>. Do i change this to img with the link to the picture? Can somebody help im just a beginner ^^
#2. Posted:
Status: Offline
Joined: Nov 07, 201113Year Member
Posts: 549
Reputation Power: 33
You use CSS.
You can link your HTML file to the .CSS file
wil a dim style tag.
You can link your HTML file to the .CSS file
wil a dim style tag.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
JIF wrote You use CSS.
You can link your HTML file to the .CSS file
wil a dim style tag.
I have made the CSS, im not sure what i need to put in it though, iv not come to grips with the whole tag thing, any guides to recommend for the tags. Sorry i only started looking into this yesterday :)Iv done the background via CSS and thats about it :/ the image is in the HTML...
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: May 27, 201113Year Member
Posts: 2,048
Reputation Power: 100
Status: Offline
Joined: May 27, 201113Year Member
Posts: 2,048
Reputation Power: 100
the best working way i would suggest using this code
That is what i normally use but i think you could just use the normal way of centering it but i suggest using the div align.
<div align=center><img src="image location here"><div>
That is what i normally use but i think you could just use the normal way of centering it but i suggest using the div align.
- 2useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
D34th_Maker wrote the best working way i would suggest using this code
<div align=center><img src="image location here"><div>
That is what i normally use but i think you could just use the normal way of centering it but i suggest using the div align.
Thanks buddy!! =)^^
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
D34th_Maker wrote the best working way i would suggest using this code
<div align=center><img src="image location here"><div>
That is what i normally use but i think you could just use the normal way of centering it but i suggest using the div align.
that doesn't seem to work in firefox.
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
Status: Offline
Joined: Dec 03, 201014Year Member
Posts: 61
Reputation Power: 2
Zachman61 wroteD34th_Maker wrote the best working way i would suggest using this code
<div align=center><img src="image location here"><div>
That is what i normally use but i think you could just use the normal way of centering it but i suggest using the div align.
that doesn't seem to work in firefox.
Seems to be working perfectly fine for me in chrome or IE.
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Jul 07, 200915Year Member
Posts: 431
Reputation Power: 4868
Status: Offline
Joined: Jul 07, 200915Year Member
Posts: 431
Reputation Power: 4868
The attribute 'align' is deprecated, that is why it doesn't work in FF.
Use the CSS equivalent text-align.
Use the CSS equivalent text-align.
<style type="text/css">
.center { text-align: center; }
</style>
<p class="center">
<img src="someimage.png" />
</p>
- 2useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
telli wrote The attribute 'align' is deprecated, that is why it doesn't work in FF.
Use the CSS equivalent text-align.
<style type="text/css">
.center { text-align: center; }
</style>
<p class="center">
<img src="someimage.png" />
</p>
Thats the word "deprecated", forgot that word.
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Nov 02, 201113Year Member
Posts: 533
Reputation Power: 33
You could use this too if your making a site with a image in the background...
<style type="text/css">
body
{
background-image:url('URL HERE WITH THE IMAGE');
background-repeat:no-repeat;
}
</style>
- 0useful
- 1not useful
You are viewing our Forum Archives. To view or take place in current topics click here.