Convert a DIV into image

oracle

New Member
Messages
430
Reaction score
0
Points
0
Hello Friends,

I have for example say a div on an html page and I want to convert it to animage say gif,png etc etc

Eg.
Code:
<html>
  <body>
    <div id="importanttext">
      <h4>Hello World!</h4>
      <img src="someimage.gif"/>
    </div>
    <div id ="blahblah">
      ............................
    </div>
  </body>
</html>

Now I want to have that div called "importanttext" as an image. Is it possible by any method?

Can any one suggest or help with a code snippet.

Imoracle
 

blu3fire

New Member
Messages
14
Reaction score
0
Points
0
i don't understand... maybe:
Code:
<div id="importanttext" style='background-image: url("someimage.gif")'></div>
 
Last edited:

oracle

New Member
Messages
430
Reaction score
0
Points
0
No No.....i want that particular div to be as an image.

For a wierd example suppose I have that div covering the whole browser page, hence it will be equivalent to a screenshot of the browser.

I hope you got it now :)
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
So what you actually want to do is make a sort of screenshot of the page and show that instead of text?
Why would you ever want to do that? Just use images you've already made then.
 

oracle

New Member
Messages
430
Reaction score
0
Points
0
No actually the image is like this:

0 Friends

well this is the base image, now as new friends get added I want to create new image like:

100 Friends

Hence what I am trying to do is, place a <div> of higher z-index over that 0 and make it look like 100. It all goes fine till here, new version looks like

100 Friends

but now its an image with a <div> over it. I would like it to be like an original image itself.

I hope you got my point

Imoracle
 

stujuk

New Member
Messages
3
Reaction score
0
Points
0
Lets see if I have this right. You want a script that will convert a div tag and its contents to an image a bit like the CAPTCHA Images for person validation on sites?
 
Top