471,616 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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

MusoFreak200
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 6763
Dormilich
8,656 Expert Mod 8TB
@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
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,656 Expert Mod 8TB
@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
i don't understand so do i add it in the body... or the head... or where?
Oct 20 '09 #5
Dormilich
8,656 Expert Mod 8TB
er, do you know how to apply a background in CSS?
Oct 20 '09 #6
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,656 Expert Mod 8TB
@MusoFreak200
eh?! what kind of teacher is that?
Oct 20 '09 #8
Dormilich
8,656 Expert Mod 8TB
@MusoFreak200
check out http://www.w3schools.com there are a lot of tutorials.
Oct 20 '09 #9
high school...

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

Post your reply

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

Similar topics

8 posts views Thread by Abs | last post: by
35 posts views Thread by Friendly_Lola | last post: by
2 posts views Thread by Roger | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

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.