By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,742 Members | 1,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,742 IT Pros & Developers. It's quick & easy.

resizing background

P: n/a
Trying to resize a photo to use it as a background and it fails under
part of the css

<img src="subway/IMG_0730.JPG" width="3264" height="2448" alt="" />

I have try and the photo does not display
<link rel="STYLESHEET" type="text/css" href="../../css/ttc.css">
<style type="text/css">
<!--
body {color: #4d9999;background-image: url(subway/IMG_0730.JPG
width="50%" height="50%");}
a:link {color: #444444;}
a:visited {color: #000033;}
a:hover {color: #ffff00;}
a:active {color: #fff;}
td {font-size: 12px;font-weight:900;font-family: arial, Helvetica,
sans-serif, verdana;color: #ffccff; background-color: transparent;}
-->
</style>

-->
I have try body {color: #4d9999;background-image: url(subway/
IMG_0730.JPG width="1000" height="1000");} also with no luck

How do I get it to work?
Thanks

May 22 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
drum118 wrote:
Trying to resize a photo to use it as a background and it fails under
part of the css

<img src="subway/IMG_0730.JPG" width="3264" height="2448" alt="" />

I have try and the photo does not display
<link rel="STYLESHEET" type="text/css" href="../../css/ttc.css">
<style type="text/css">
<!--
body {color: #4d9999;background-image: url(subway/IMG_0730.JPG
width="50%" height="50%");}
Because this is made up syntax, see:

http://www.w3.org/TR/CSS21/colors.ht...ckground-image

You cannot redimension a *background* image with CSS. if you want an
image resizable to the window you have to fake that the image is a
background with positioned elements, but it usually looks bad because a
web browser does not do a very good job of resampling and image. Also
3264x2448 is a monster image which would take some time to download even
on broadband connections. BAD idea.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
May 23 '07 #2

P: n/a
drum118 wrote:
<style type="text/css">
<!--
-->
</style>
Besides the other errors, remove the HTML comment marks from the style
block. They are not necessary, and may be causing (some) of your
problems.

--
-bts
-Motorcycles defy gravity; cars just suck
May 23 '07 #3

P: n/a
On May 22, 7:56 pm, "Jonathan N. Little" <lws4...@centralva.net>
wrote:
drum118 wrote:
Trying to resize a photo to use it as a background and it fails under
part of the css
<img src="subway/IMG_0730.JPG" width="3264" height="2448" alt="" />
I have try and the photo does not display
<link rel="STYLESHEET" type="text/css" href="../../css/ttc.css">
<style type="text/css">
<!--
body {color: #4d9999;background-image: url(subway/IMG_0730.JPG
width="50%" height="50%");}

Because this is made up syntax, see:

http://www.w3.org/TR/CSS21/colors.ht...ckground-image

You cannot redimension a *background* image with CSS. if you want an
image resizable to the window you have to fake that the image is a
background with positioned elements, but it usually looks bad because a
web browser does not do a very good job of resampling and image. Also
3264x2448 is a monster image which would take some time to download even
on broadband connections. BAD idea.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
Thanks.

I thought the size was the issue and wanted see if there was a way to
get around it.

Yes 3264x2448 is a monster image as I shoot at 8mg. That is why I
asked the question. I thumbnail at 125x125 with a click to in large.

May 23 '07 #4

P: n/a

"drum118" <dr*****@hotmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
I thought the size was the issue and wanted see if there was a way to
get around it.

Yes 3264x2448 is a monster image as I shoot at 8mg. That is why I
asked the question. I thumbnail at 125x125 with a click to in large.
"Resizing" an image in the HTML img tag attributes does _not_ alter the file
size, only the view of the image. Every single little 1 and 0 must still be
downloaded.

It would be much better to use an image editor, such as Photoshop, to resize
the image to a thumbnail and save to a different name after saving it at a
larger size.

El
May 23 '07 #5

P: n/a
El Kabong wrote:
"drum118" <dr*****@hotmail.comwrote:
>Yes 3264x2448 is a monster image as I shoot at 8mg. That is why I
asked the question. I thumbnail at 125x125 with a click to in large.

It would be much better to use an image editor, such as Photoshop, to
resize the image to a thumbnail and save to a different name after
saving it at a larger size.
It definitely needs resized. :-0 Though for an image of the claimed
size (8 megabytes!), a simple resize isn't enough; he would end up with
a tiny unrecognizable blur. In this case, the thumbnail should be
created by cropping a small ~100px area showing some significant part of
the original. Maybe a face, if there is one.

Unless this is a photography site, 8MB is too large for the Web in
almost every case.

--
-bts
-Motorcycles defy gravity; cars just suck
May 23 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.