473,554 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do you make your background image automatically resize itself to fit any screen

MusoFreak200
96 New Member
hello

i am creating a website for both my school assignment and to really upload.

could someone help me with the following question, please?

how do you make your background image automatically resize itself to fit any screen without having extra scrollbars and having the image stay fixed and the words just move?

any help would be appreciated.

TY
MusoFreak200
Oct 20 '09 #1
9 6946
Dormilich
8,658 Recognized Expert Moderator Expert
@MusoFreak200
not at all (afaik), although you might use a repeating pattern or an image, that blends into background.

Ö and background images do not cause scrollbars.

alternatively, instead of using the CSS background, you can make a real image as a kind of background, although it may break the layout or provide other trouble.

@MusoFreak200
CSS backgrounds
Expand|Select|Wrap|Line Numbers
  1. background-position: fixed;
HTML Elements
Expand|Select|Wrap|Line Numbers
  1. position: fixed;
(not (partly?) implemented in IE)
Oct 20 '09 #2
MusoFreak200
96 New Member
thank you so much...

but i still am having trouble understanding.. . where exactly do i add the "background-position: fixed;" code?
Oct 20 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
@MusoFreak200
to the CSS declaration of the element, that holds the background-image (theoretically you can add it everywhere, beside thatís making no sense at all)
Oct 20 '09 #4
MusoFreak200
96 New Member
i don't understand so do i add it in the body... or the head... or where?
Oct 20 '09 #5
Dormilich
8,658 Recognized Expert Moderator Expert
er, do you know how to apply a background in CSS?
Oct 20 '09 #6
MusoFreak200
96 New Member
no only html... sorry i still learning in class but my teacher didn't know how...

its for an assignment
Oct 20 '09 #7
Dormilich
8,658 Recognized Expert Moderator Expert
@MusoFreak200
eh?! what kind of teacher is that?
Oct 20 '09 #8
Dormilich
8,658 Recognized Expert Moderator Expert
@MusoFreak200
check out http://www.w3schools.com there are a lot of tutorials.
Oct 20 '09 #9
MusoFreak200
96 New Member
high school...

anyway back to the code...
Oct 20 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
10462
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all have the same name and reside in the following physical path structure:
8
9433
by: Abs | last post by:
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? Thanks in advance
8
9256
by: Matt | last post by:
I've been searching around for a simple way to display a background image in my MDI form's client area. I want to be able to load the image from file on start up and have it resize as the MDI form is resized. It's the resizing part that I am having trouble with. I've seen a few old posts that point in the right direction but nothing...
14
48963
by: Seige | last post by:
Ever had headache when you can't resize the background width using CSS: body{ background: url(/images/bg.jpg) ; background-width: 800px; } It won't work, would it? Of course not, it's not even defined in CSS. So, let's try to work it out using Javascript: There are two methods, first method you prepare plenty of different
35
4127
by: Friendly_Lola | last post by:
What Screen Resolution do You use? 800 X 600 1024 X 768 1280 X 1024 Wow! 1600 X 1200 (i can't imagine this) I use 1024 X 768. For what resolution you optimize your web pages?
2
2988
by: Roger | last post by:
Hi, Can anybody help to fix the vertical centering of an image in Firefox (2.0)? Apparently, Firefox puts the top half of the image in the background of the top of the screen instead of placing it just in the middle of the screen. Works wel in IE though. The code itself is very simple as you can see here:...
6
3434
by: ChrisAtWokingham | last post by:
I am creating a website using .Net v2.0 and c# and I have a problem with background images. I want to dynamically change the background image on the page, depending on data in the SQL database. If I place an <asp> label after the <body> tag, within one of the .NET containers, then it is easy to get the c# code to dynamically change the...
1
2318
by: Bob Alston | last post by:
Anyone use the AHRESIZE utility to resize a form dynamically who is also using background images? I have an app that creates electronic versions of manual forms. I digitize the manual form and load it (at run time) as the form background. then, on top of it I place the fields. Seems to work well. Now I am trying to allow use of the...
0
7536
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8053
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7576
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7895
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5165
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3564
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1147
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.