Page 1 of 1

background image

Posted: Sun Jun 30, 2013 4:23 pm
by Vegan
I have created a gradient bar I wanted to use as a background in a <div> with some text on top of the image

background-image has been problematic even with a fully qualified URL

so I wonder if I am doing things wrong

the part of my gaming site I am attempting to place the image is the site banner, the blue gradient looks better

Image

Re: background image

Posted: Sun Jun 30, 2013 10:50 pm
by Vegan
Figured out the problem, cannot put the background image into a style in a CSS sheet

using a <div> and a oversized wide graphic works only with the inline declaration

sure seems to be sensitive to placing objects to create an FX

Re: background image

Posted: Mon Jul 01, 2013 11:29 am
by Christopher
Vegan wrote:Figured out the problem, cannot put the background image into a style in a CSS sheet
You can use background-image in style sheets, but you need to use url(). Can you post some code?

Re: background image

Posted: Sat Jul 06, 2013 7:42 pm
by Vegan

Code: Select all

blue-grad {
	width: 100%;
	background-image:url('http://www.hardcore-games.tk/images/gradient1.png');
	background-repeat:repeat-x;
}
and the site body is

Code: Select all

#global {
	max-width: 1900px;
	margin: 0 auto;
	background-color: #90ff90;
	padding: 10px;
}

Re: background image

Posted: Sat Jul 06, 2013 11:37 pm
by Christopher
Don't use quotes around the URL in background-image:url()