![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Currently I am trying to make a background image show up in a div that is designated by an id. The image is not appearing and after doing some googling I'm still a bit lost. Is it possible to display a background image in a div ID? Can someone school me a bit on this? I have supplied a link to the test page below. I know the image is in the correct directory because I can make it appear with a basic img tag. http://ocg6.marine.usf.edu/patrick/test_css/test.html |
#3
| |||
| |||
|
|
Patrick wrote: Currently I am trying to make a background image show up in a div that is designated by an id. The image is not appearing and after doing some googling I'm still a bit lost. Is it possible to display a background image in a div ID? Can someone school me a bit on this? I have supplied a link to the test page below. I know the image is in the correct directory because I can make it appear with a basic img tag. http://ocg6.marine.usf.edu/patrick/test_css/test.html You first set: background-image, and then "background:#FFF; Just 'background', overrules all the other styles, since it's the shorthand. Change it into background-color:#FFF; and the image appears. Or put it all in the shorthand instead, and save some bytes: background: #FFFFFF url(backfilled-samp.jpg) no-repeat; Note: Your image is grey. Best set the background colour also to that colour, so that for instance white letters will still be readable in case someone isn't seeing the background image. |
![]() |
| Thread Tools | |
| Display Modes | |
| |