Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backgound Image Size

Status
Not open for further replies.

newphpbie

Programmer
Oct 17, 2003
110
GB
HI,

I am using a .jpg image file as my background. At the moment my image is displayed far to large and over half the image is off the page. I am not using CSS and I would like to solve this problem without having to create a CSS if possible.

My current code is...
Code:
<body background=logo.jpg>

I can't find the attributes I should add to that line to reduce or limit the size of the image displayed.

I would imagine it is something like
Code:
<body background=logo.jpg width=150 height=150>

but this doesn't work....

Any idea's to share...??

TIA
 
Yes, I do want to make the jpeg smaller.

I don't understand what you mean by putting it in a layer. Any chance of an example...

I know large jpegs slow the site down but I am only using it on a very simple log in page so the loading time is still under a couple of secs.

 
As luds suggested, first option to do that should be making the .jpg smaller. It will reduce its size and achieve the effect you're looking for. You can successfuly resize jpegs with many programs, I would suggest Irfanview ( which is small, requires hardly and installation at all and can view/resize nearly any format.

If for some perverted reason you do not want to make the jpeg smaller, you will have to resort to CSS.
 
Lovely...

I'll just try making the jpeg smaller with Irfanview.

Thanks for your help.
 
It's worked a dream...

thanks for the program recommendation..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top