CSS background image

All about creating websites!
Post Reply
mystikblaze
Infinite Haze
Infinite Haze
Posts: 334
Joined: 11 Jun 2005, 16:00
18
Location: abroad
Contact:

CSS background image

Post by mystikblaze »

..
Last edited by mystikblaze on 21 Jun 2009, 08:19, edited 4 times in total.

User avatar
computathug
Administrator
Administrator
Posts: 2693
Joined: 29 Mar 2007, 16:00
17
Location: UK
Contact:

Post by computathug »

body background="background.jpg" inside <>
should do what you want :wink:

mystikblaze
Infinite Haze
Infinite Haze
Posts: 334
Joined: 11 Jun 2005, 16:00
18
Location: abroad
Contact:

Post by mystikblaze »

..
Last edited by mystikblaze on 21 Jun 2009, 08:19, edited 1 time in total.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

Code: Select all

background-size: 100%;
but I don't know how well it is supported by the different browsers, at least older IE versions might act bitchy or simply ignore it completely.
so thuggy's suggestion is definitely more reliable.

mystikblaze
Infinite Haze
Infinite Haze
Posts: 334
Joined: 11 Jun 2005, 16:00
18
Location: abroad
Contact:

Post by mystikblaze »

..
Last edited by mystikblaze on 21 Jun 2009, 08:17, edited 1 time in total.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

as I said, I don't know how well browsers support it yet, because it's the latest CSS version.
I don't think it's possible to do this yet without using at least a little HTML if you want a reliable support for all browsers. you can take a look here for example, but there is always a little HTML needed, no matter how you do it:
http://webdesign.about.com/od/css3/f/blfaqbgsize.htm

usually no problem, but when you can't use HTML tags on myspace you have bad luck... :?
what about simply making the background image bigger so it fits without stretching?

User avatar
skip
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 204
Joined: 27 Oct 2007, 16:00
16
Location: 18th Galaxy

Post by skip »

this might help. maybe. :D

Code: Select all

http://css3.com/
its available on css3 but css3 is currently under development. And it will take sometime until its implemented on most browsers.

Code: Select all

http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size
try bb's suggestion. :D
Image Image Image

Post Reply