Stretching a background image

  • zudo
  • Beginner
  • Beginner
  • zudo
  • Posts: 35

Post 3+ Months Ago

I need to stretch background image, I tried a google but I didn't come up with anything. Is their a way to take a big background and down-size it?

Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Nope. It's coming with CSS3, which means it will be about 4 years before a sensible number of people have browsers that support it.

Your best bet is to do some positioning. Try googling

CSS z-index "position:absolute"

and see what you get. You should be able to make an image tag stretch to the right size and then place the content over the top.

It's a round-about way of doing things, and there are some situations that it just won't work in, but as far as I know, it's the only way with html/CSS2

Hope this helps.
  • zudo
  • Beginner
  • Beginner
  • zudo
  • Posts: 35

Post 3+ Months Ago

Well then, how do I get my background to stop tiling? Allso, is their a way to set two backgrounds, one on top of another?
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

to stop tyling, in CSS:

Code: [ Select ]
background-repeat:none;


for multiple background images, this is technically a no, but you can nest some elements, ie a div inside a div. Give the container div a bg image, then give the nested div a different bg image. Alternatively you can use position:absolute to place them on top of one another.

However, if you want two images on the body, you can set one on the body and one on the html tag - that works for me.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 82 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.