Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Image Anywhere
ironchicken
post Jan 27 2008, 09:26 AM
Post #1


Member [Level 1]
****

Group: Members
Posts: 52
Joined: 26-August 07
Member No.: 48,866



I want to know how to put an image anywhere in the page using HTML/JavaScript.

Please Help.
Go to the top of the page
 
+Quote Post
rvalkass
post Jan 27 2008, 09:51 AM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,052
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



To put an image on the page you use the IMG tag:

HTML
<img src="path/to/image.png" width="200" height="150" alt="Alternative text if image cannot be displayed" />


src defines the path to the image. Width and height are fairly obvious, measured in pixels. Alt is text which gets displayed if the user has a text-based browser, the image can't be downloaded or anything like that. It is also shown when the user mouses over the image. The image will appear wherever you put that tag. W3Schools have a good guide to using the IMG tag which I advise you read through.

To literally position it "anywhere in the page" you'd need to use some CSS to position it where you wanted, most likely using absolute positioning. This page has a quick guide to using CSS, and that link specifically goes to an example of absolutely positioning an image.
Go to the top of the page
 
+Quote Post
jlhaslip
post Jan 27 2008, 05:31 PM
Post #3


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,874
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



You do not need to use absolute positioning, either.
Floats, Margins and Padding can be used to place block-level items on the page.

Do you have a page of code for us to look at and assist with your layout problem? If so, post it up.

thanks.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. My First Image(12)
  2. Image Weaver(0)
  3. For Anyone Who Wants To Have Compact Image Gallery(4)
  4. Move/delete Image On Webpage Automatically?(2)
  5. Image Splicer?(1)
  6. Rollover Image Tutorial(2)
  7. Avoid Image Download(6)
  8. Syndicated Image Feeds(0)
  9. Image Refresh(5)
  10. Image Galleries(10)
  11. Use Cell Background Image On Css?(2)
  12. Making A Scroll Bar In Flash(4)
  13. How Do You Enlarge An Image?(8)
  14. Hoverbox Image Gallery(1)
  15. Selecting Specific Part Of Image And Adding Description(6)
  1. How Do I Put A Flash Image In My Website(10)
  2. Image Not Taking The Right Size In Web Page(1)
  3. Image Calling Problem Solved(1)
  4. Cascading Windows(5)


 



- Lo-Fi Version Time is now: 24th July 2008 - 06:30 AM