resize image

G

Guest

I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 
G

Guest

Ken's method should work except that it sounds like you want to generate the
image dynamically from a database. To do so, you will need to create a
separate ASPX file (ie. MyDynamicImage.aspx) that outputs the image binary
and specifies the appropriate Response.ContentType for the image and (maybe)
add the "content-disposition" header. Then, using Ken's method, you can
specify the source of the image via
url(MyDynamicImage.aspx?ImageID=[identifier])

Ken Cox said:
Hi Mike,

You need to use a Style. Try this?

<body style="background:ivory url(http://www.gc.ca/images/rollingflag.jpg)
no-repeat;background-position:center center ; ">

Ken
MVP [ASP.NET]


Mike said:
I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 
G

Guest

Ken's method should work except that it sounds like you want to generate the
image dynamically from a database. To do so, you will need to create a
separate ASPX file (ie. MyDynamicImage.aspx) that outputs the image binary
and specifies the appropriate Response.ContentType for the image and (maybe)
add the "content-disposition" header. Then, using Ken's method, you can
specify the source of the image via
url(MyDynamicImage.aspx?ImageID=[identifier])

Ken Cox said:
Hi Mike,

You need to use a Style. Try this?

<body style="background:ivory url(http://www.gc.ca/images/rollingflag.jpg)
no-repeat;background-position:center center ; ">

Ken
MVP [ASP.NET]


Mike said:
I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top