CSS backgrounds
- Started
- Last post
- 4 Responses
- doesnotexist
im trying to set a background in an element to an image...but it's not working.
something like this
#nav{
font-family: Georgia;
font-size: 12px;
font-weight: bold;
text-align: left;
color: #FFFFFF;
background-image: url(nav-bg.gif);
background-attachment: fixed;
background-repeat: no-repeat;
background-color: #FF3300;
padding: 5px;
margin: 20px 0px 20px 0px;
word-spacing: 1px;
- UndoUndo0
is nav-bg.gif in the root directory where yr css file is? if not the path to this file is wrong
- VectorMasked0
^ what he said
- who0
the id style is correct...
check the style path (if the css is an external file) and the image path...
- Gordy220
You have'nt positioned it?
you can use the abbreviated version which'd look like thise:
background: #FF3300 url(nav-bg.gif) no-repeat 0 0;
0 0 = the position of the image, can be %, px etc.