473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to make background img fit

How do I make my background image fit the screen so
no one has to scroll, and at the same time it's not
tiled looking??

I have one that is 800x600 and one that is 1084x768.

The small one tiles.. and the big one cuts off the bottom.

http://www.azclan.net/index2.html is currently the larger
jpg.
Thanks
STEve

--
(Johnny sleeping with father's new gf)
"On a creepy scale of 1 to 100, that's like a 99 and a half" -Matt
(Father announces they are getting married)
"There goes that half a creep point!" - Matt to his wife SINGLE GUY
Jun 28 '06 #1
4 13707
You don't--there isn't a way to specify the width and height of the
background image different from its intrinsic width and height. And you
really wouldn't want to, since it would be ugly and distorted at many,
if not most, sizes.

Steve Dambrowski wrote:
How do I make my background image fit the screen so
no one has to scroll, and at the same time it's not
tiled looking??

I have one that is 800x600 and one that is 1084x768.

The small one tiles.. and the big one cuts off the bottom.

http://www.azclan.net/index2.html is currently the larger
jpg.
Thanks
STEve

Jun 28 '06 #2
In our last episode, <e7**********@reader2.panix.com>, the lovely and
talented Steve Dambrowski broadcast on comp.infosystems.www.authoring.html:
How do I make my background image fit the screen so
no one has to scroll, and at the same time it's not
tiled looking??


You can't. You can use the smaller image and keep it from repeating
(tiling) with css. Css also allows you to position the background-image
relatively and decide whether it will scroll with window or not. It will
still be cut off if by combination of resolution and browser window size
there isn't room for it. There is no provision for scaling background
images, so you cannot be sure it will fit in every window. Depending upon
the nature of the image you can make it appear fairly seamlessly on the
background through judicious choice of background-color. With photographs
it may be desirable to fade the edges so that a seamless appearance can be
achived. A seamless appearance is easier to achieve with logos and line
drawings in .gif format. This still will fail if the user overrides your
choice of background-color.
--
Lars Eighner http://larseighner.com/ http://myspace.com/larseighner
War on Terrorism: Camp Follower
"I am ... a total sucker for the guys ... with all the ribbons on and stuff,
and they say it's true and I'm ready to believe it. -Cokie Roberts,_ABC_
Jun 28 '06 #3
To further the education of mankind, Steve Dambrowski <st****@panix.com>
vouchsafed:
How do I make my background image fit the screen so
no one has to scroll, and at the same time it's not
tiled looking??


Put the image (not bg) in an absolutely-positioned div of 100% width and
height which is z-indexed beneath the rest of the content. Set image size
to 100%. Put all other content in a container of 100% height and width
with overflow:auto.

--
Neredbojias
Infinity has its limits.
Jun 28 '06 #4
In <Xn**********************************@208.49.80.25 1> Neredbojias <http://www.neredbojias.com/fliam.php?cat=alt.html> writes:
To further the education of mankind, Steve Dambrowski <st****@panix.com>
vouchsafed:

How do I make my background image fit the screen so
no one has to scroll, and at the same time it's not
tiled looking??

Alright.. Well, I got it to work in a way that it's not bad...

Thanks everyone for their help!
STEve

--
(Johnny sleeping with father's new gf)
"On a creepy scale of 1 to 100, that's like a 99 and a half" -Matt
(Father announces they are getting married)
"There goes that half a creep point!" - Matt to his wife SINGLE GUY
Jun 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Paul Schnitter | last post by:
Update: My custom control is based on the article "Creating Visual Basic .NET controls from scratch" in "Adventures in .NET" on MSDN. It is designed to be a replacement for the VB6 shape...
2
by: zwylle | last post by:
Hi all, to avoid a nervous breakdown I finally decided to seek help :D I have a table defined with plain color background and in some cells I show pictures to frame my site. The problem I...
82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
3
by: Gnolen | last post by:
Hi, I am wondering if someone could guide me in the right direction about this. How can I make div 'one' hover? Does not need to be clickable/link...It would be easy if the images was not...
1
by: Ronny Sigo | last post by:
Hello all, I want to create a new word document from VBA (Access). All goes well, except that I also want to establish a background programmatically. So I made a macro is MS WORD, to see how it's...
3
by: moondaddy | last post by:
I have some text in a page that when a certain even happens, I need to make it glow from black to red (through a spand of 1 second) pause for a few seconds, and then slowly change from red to black...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
7
by: Ryaby21 | last post by:
Please help! i have everything set up with my CSS HTML layout and its all good. im using 3 divs at the moment and what i want to to do now is to add a new div with a background for the page. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.