Click to See Complete Forum and Search --> : I want to step out from my comfort zone of TABLE world


Lodovikus
12-02-2005, 10:14 PM
Yep I've made my mind up to tackle thy seems to be wonderful world of CSS, well my friends I'm TABLEd out. Don't get me wrong TABLE had helped me out to get through the process of learning html and now I'm quite comfortable with it.

Now I want to learn CSS but I'm a type person who reads things million of times otherwise nothing will make sense to me, call me stupid but I'm not going to giving up.

My question to day is about set up background images, I can see CSS said backgroud-image:url(imageName.gif);
Now...if I have view different size div's, can I use only one background image and CSS would be able to shrink or grow that image according to div's specified size. Ofcourse I can make this different size images in image editor like photoshop but there must be a better way.....hope by learning CSS the better ways will come my way

thank you in advance for your help
Regards
Lodovikus

Kravvitz
12-02-2005, 11:36 PM
Nope, unfortunately CSS2 does not provide a way to specify the size of background images.

LJK
12-03-2005, 12:39 PM
Hi -
Ways that people get around the limitations:
- create graphics that fade into a bkgnd. color if resized larger
- use bkgnd. images on divs, paragraphs, h#, etc.
- position the image - here's the shortcut background rule:
background:#3399cc url("directory/file.ext") no-repeat 0% 0%;
Where you set a hex or colorname or rgb to display if the image doesn't - or uncovered areas, list the location of the image file, determine if it's to repeat, no-repeat, repeat-x or repeat-y, [can add the word fixed after that if you want a fixed image for the body tag], then distance in % or px from the elements' left and top edges.

[If it's set for a tag w/out other content, should set the height:property.]

Have fun & enjoy the cascade,
El

Lodovikus
12-04-2005, 06:33 AM
Thank you LJK, I can see the light in the end of the tunnel. I will experiment with your method

Regards
Lodovikus