SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Text box with Background image?
-
Dec 25, 2002, 14:25 #1
- Join Date
- Dec 2002
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Text box with Background image?
I'm very new to CSS, and I wanted to know if it's possible to use a background repeating image for a text box? I see that a background color is possible, but have not seen anything about using a repeating tile.
Thanks,
Candle
-
Dec 25, 2002, 17:07 #2
- Join Date
- Aug 2002
- Location
- Australia
- Posts
- 56
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It is possible, sure. Simply use the background-image property (or the background shortcut if you prefer).
Playing a bit I found a strange thing, though. With IE and NS6.2 there were no problems, but with Mozilla(1.2) I got a surprising behaviour: if only a background image is specified, it doesn't have any effect. But if a background color is also provided (which, by the way, should always be done), the image is then correctly displayed. ?¿? Anyone knows why?
Good luck with your CSS progress!
-
Dec 26, 2002, 04:54 #3Originally posted by dense13
Playing a bit I found a strange thing, though. With IE and NS6.2 there were no problems, but with Mozilla(1.2) I got a surprising behaviour: if only a background image is specified, it doesn't have any effect. But if a background color is also provided (which, by the way, should always be done), the image is then correctly displayed. ?¿? Anyone knows why?
Passing an under-sepcified shorthand attribute through the W3C's online css validator returns an invalidation notice due to "too few values for the property".
e.g. font shorthand attribute requires at least two values to be set in order to validate.
font: Georgia; or font: 12px; will neither validate nor work on the more adherent browsers (Moz,...), though font: 12px Georgia; will both validate and work.
While I am aware that this is the case, I have not searched the W3C site (or any other) thoroughly enough to have yet found out exactly *why* this has been implemented and perhaps more confusingly, why it seems that it has been implemented for *some* shorthand attributes and not others (such as background(?) and margin).
So the bottom line is that it is meant to be that way.
It is those browsers that currently still accept and use 'under-valued' css shorthand attributes that will be adopting a more strict approach to handling css shorthand with each new release.
...presumably.Last edited by Bill Posters; Dec 27, 2002 at 11:58.
New Plastic Arts: Visual Communication | DesignateOnline
Mate went to NY and all he got me was this lousy signature
-
Dec 27, 2002, 10:03 #4
- Join Date
- Dec 2002
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you for the information, and I'll be sure to specify a background color as well when I give this a try.
Candle
Bookmarks