PDA

View Full Version : CSS Help



Colin-Roberts
27-09-2006, 08:52 PM
How i make this so it doesnt repeat and is centered:


background: #FFFFFF url(style_images/<#IMG_DIR#>/forum.PNG);

RYANNNNN
27-09-2006, 10:02 PM
center {
background-image: ('forum.PNG');
top: 500px;
left: 250px;
}

Something like that, I don't really know css that well.

nets
27-09-2006, 10:05 PM
body {
background: #FFFFFF url('style_images/<#IMG_DIR#>/forum.PNG') center no-repeat;
}

RYANNNNN
27-09-2006, 10:06 PM
body {
background-image: url('style_images/<#IMG_DIR#>/forum.PNG');
background-color: #FFFFFF;
background-positon: center;
background-repeat: no-repeat;
}

ah, there we go.

joshua, out of interest would that code center the bg both height and widthwise?

nets
27-09-2006, 10:32 PM
ah, there we go.

joshua, out of interest would that code center the bg both height and widthwise?
I changed it to the shortcut attribute. ANYWAY, I think it wont be centred vertically & horizontally in FF, to fix that you'll need to add "fixed" at the beginning of the declaration:


body {
background: fixed #FFFFFF url('style_images/<#IMG_DIR#>/forum.PNG') center no-repeat;
}

Want to hide these adverts? Register an account for free!