Connecting Tech Pros Worldwide Help | Site Map

Backgrounds...

  #1  
Old November 8th, 2008, 04:05 PM
Barely Audible
Guest
 
Posts: n/a
Quick question...

background:#CBCBC3
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */

produces the light grey background to the page with an olive drab header
along the top of the page.

How do I change the background color to a background image?

The obvious (to me) solution doesn't seem to work

background-image: url(../../../graphics/lighttex.gif)
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */

Any help is appreciated...

  #2  
Old November 8th, 2008, 08:55 PM
Jukka K. Korpela
Guest
 
Posts: n/a

re: Backgrounds...


Barely Audible wrote:
Quote:
Quick question...
A "quick question" is usually a hasty question that does not describe the
real problem.
Quote:
background:#CBCBC3
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */
Where's your URL? And what's that odd thing {{url}}?

--
Yucca, http://www.cs.tut.fi/~jkorpela/

  #3  
Old November 8th, 2008, 10:05 PM
dorayme
Guest
 
Posts: n/a

re: Backgrounds...


In article <6nlrctFm6828U1@mid.individual.net>,
Barely Audible <somewhere@overthe.rainbowwrote:
Quote:
Quick question...
>
background:#CBCBC3
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */
>
produces the light grey background to the page with an olive drab header
along the top of the page.
>
How do I change the background color to a background image?
>
The obvious (to me) solution doesn't seem to work
>
background-image: url(../../../graphics/lighttex.gif)
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */
>
Any help is appreciated...
Your code is mistaken

Better is this construction:

background: #FFF8DC url("pics/rogerRabbitProfile.png") no-repeat top
left;

This is a shorthand property that sets the colour and the image and
other things all at once.

The #FFF8DC sets the colour of the background. This means that it will
be cornsilk and show itself where the opaque parts of the image are not.

(Roger Rabbit happens to have a very finite profile - not even as big as
the small Bob Hoskins - and will soon enough end, especially since there
is a no-repeat).

If you want an element's background colour to come from an image, you
need to set it to 'repeat'. For example, if you have an image of a
colour that you like and want to use but, for some reason, cannot
reproduce by using one of the extensive permutations from #******, then
simply

background: #DC143C url("pics/crimson.png") repeat;

gets it for you. ('repeat' is default so you don't even need this)

The idea of the #DC143C here is that if the image fails to load for some
reason, then you get a safety net substitute HTML colour.

In practice, there is hardly much point in using a pure colour from an
image. Waste of time because there is usually an HTML match in #******

If it has a texture, then there is a real point.

I will now stop and have breakfast.

--
dorayme
  #4  
Old November 9th, 2008, 01:15 AM
Barely Audible
Guest
 
Posts: n/a

re: Backgrounds...


dorayme wrote:
Quote:
In article <6nlrctFm6828U1@mid.individual.net>,
Barely Audible <somewhere@overthe.rainbowwrote:
>
Quote:
>Quick question...
>>
>background:#CBCBC3
>url({{url}}mod/template/templates/Default_Template/images/header.gif)
>repeat-x; /* #d9e2f2 */
>>
>produces the light grey background to the page with an olive drab header
>along the top of the page.
>>
>How do I change the background color to a background image?
>>
>The obvious (to me) solution doesn't seem to work
>>
>background-image: url(../../../graphics/lighttex.gif)
>url({{url}}mod/template/templates/Default_Template/images/header.gif)
>repeat-x; /* #d9e2f2 */
>>
>Any help is appreciated...
>
Your code is mistaken
>
Better is this construction:
>
background: #FFF8DC url("pics/rogerRabbitProfile.png") no-repeat top
left;
>
This is a shorthand property that sets the colour and the image and
other things all at once.
>
The #FFF8DC sets the colour of the background. This means that it will
be cornsilk and show itself where the opaque parts of the image are not.
>
(Roger Rabbit happens to have a very finite profile - not even as big as
the small Bob Hoskins - and will soon enough end, especially since there
is a no-repeat).
>
If you want an element's background colour to come from an image, you
need to set it to 'repeat'. For example, if you have an image of a
colour that you like and want to use but, for some reason, cannot
reproduce by using one of the extensive permutations from #******, then
simply
>
background: #DC143C url("pics/crimson.png") repeat;
>
gets it for you. ('repeat' is default so you don't even need this)
>
The idea of the #DC143C here is that if the image fails to load for some
reason, then you get a safety net substitute HTML colour.
>
In practice, there is hardly much point in using a pure colour from an
image. Waste of time because there is usually an HTML match in #******
>
If it has a texture, then there is a real point.
>
I will now stop and have breakfast.
>
This still hasn't actually answered the question!
  #5  
Old November 9th, 2008, 01:25 AM
Nik Coughlin
Guest
 
Posts: n/a

re: Backgrounds...


"Barely Audible" <somewhere@overthe.rainbowwrote in message
news:6nmrlkFmbkgsU1@mid.individual.net...
Quote:
This still hasn't actually answered the question!
Because what you are trying to do is assign multiple background images to
the same element, and CSS only allows one background image per element.

Multiple backgrounds are a CSS3 feature, currently AFAIK only supported by
the Webkit browsers (Safari/Konquerer/Chrome etc) and I have a sneaking
suspicion Firefox 3.1, but I haven't checked that last.

At the moment the only way to reliably do what you're talking about is to
put the element in a wrapper and assign the extra background to the wrapper
instead.

  #6  
Old November 9th, 2008, 01:35 AM
dorayme
Guest
 
Posts: n/a

re: Backgrounds...


In article <6nmrlkFmbkgsU1@mid.individual.net>,
Barely Audible <somewhere@overthe.rainbowwrote:
Quote:
dorayme wrote:
Quote:
In article <6nlrctFm6828U1@mid.individual.net>,
Barely Audible <somewhere@overthe.rainbowwrote:
Quote:
Quote:
Quote:
background:#CBCBC3
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */
>
produces the light grey background to the page with an olive drab header
along the top of the page.
>
How do I change the background color to a background image?
>
Quote:
Quote:

Your code is mistaken

Better is this construction:
[... here, poor old dorayme, on any empty stomach tries its very best to
help an earthling that I can hardly even hear with boosted signal
electonics...]
Quote:
Quote:
>
This still hasn't actually answered the question!
I was hoping to give you enough background on it for you to be able to
understand what to do. You do not say if you understood anything I said?

--
dorayme
  #7  
Old November 9th, 2008, 01:45 AM
dorayme
Guest
 
Posts: n/a

re: Backgrounds...


In article <gf5dv8$ll0$1@registered.motzarella.org>,
"Nik Coughlin" <nrkn.com@gmail.comwrote:
Quote:
"Barely Audible" <somewhere@overthe.rainbowwrote in message
news:6nmrlkFmbkgsU1@mid.individual.net...
Quote:
This still hasn't actually answered the question!
>
Because what you are trying to do is assign multiple background images to
the same element, and CSS only allows one background image per element.
>
Multiple backgrounds are a CSS3 feature, currently AFAIK only supported by
the Webkit browsers (Safari/Konquerer/Chrome etc) and I have a sneaking
suspicion Firefox 3.1, but I haven't checked that last.
>
At the moment the only way to reliably do what you're talking about is to
put the element in a wrapper and assign the extra background to the wrapper
instead.
Yes... along lines like:

<http://netweaver.com.au/alt/multipleBackgrounds.html>

--
dorayme
  #8  
Old November 9th, 2008, 04:05 AM
rf
Guest
 
Posts: n/a

re: Backgrounds...



"Barely Audible" <somewhere@overthe.rainbowwrote in message
news:6nlrctFm6828U1@mid.individual.net...
Quote:
Quick question...
>
background:#CBCBC3
url({{url}}mod/template/templates/Default_Template/images/header.gif)
This looks like unparsed server side template stuff. It's better to supply
the *output* from that template parser, a URL to your page for example.
In any case it looks like it is supplying a background image.
Quote:
repeat-x; /* #d9e2f2 */
>
produces the light grey background to the page with an olive drab header
along the top of the page.
>
How do I change the background color to a background image?
You already have a background image. See above.
Quote:
>
The obvious (to me) solution doesn't seem to work
>
background-image: url(../../../graphics/lighttex.gif)
url({{url}}mod/template/templates/Default_Template/images/header.gif)
repeat-x; /* #d9e2f2 */
It doesn't work because you are supplying two backround images. Obviously
the second one is the one that is used.


  #9  
Old November 9th, 2008, 08:25 AM
Jukka K. Korpela
Guest
 
Posts: n/a

re: Backgrounds...


Barely Audible wrote:
Quote:
This still hasn't actually answered the question!
You haven't asked a sensible question, and you don't seem to have understood
or even read the responses you got (you indicate this by pointless
fullquoting).

It just remains to kindly ask you to keep using the same forged sender
information in your future postings (until you get a clue), to help keeping
Usenet a cleaner place. TIA!

--
Yucca, http://www.cs.tut.fi/~jkorpela/

  #10  
Old November 9th, 2008, 09:15 AM
Barely Audible
Guest
 
Posts: n/a

re: Backgrounds...


Nik Coughlin wrote:
Quote:
"Barely Audible" <somewhere@overthe.rainbowwrote in message
news:6nmrlkFmbkgsU1@mid.individual.net...
Quote:
>This still hasn't actually answered the question!
>
Because what you are trying to do is assign multiple background images to
the same element, and CSS only allows one background image per element.
>
Multiple backgrounds are a CSS3 feature, currently AFAIK only supported by
the Webkit browsers (Safari/Konquerer/Chrome etc) and I have a sneaking
suspicion Firefox 3.1, but I haven't checked that last.
>
At the moment the only way to reliably do what you're talking about is to
put the element in a wrapper and assign the extra background to the wrapper
instead.
>
Ah thanks Nik!
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple backgrounds Johan answers 6 August 26th, 2008 07:55 PM
Print Report with 2 subreports while maintaining different image backgrounds ghadley_00@yahoo.com answers 0 November 16th, 2005 04:45 AM
I cannot seem to get around solid backgrounds on logo images I paste into Access 97 forms MLH answers 6 November 13th, 2005 11:14 AM
bitmap backgrounds? Greg Locke answers 2 July 22nd, 2005 09:51 PM
why backgrounds and bgcolors not print? RoDzZzZ answers 1 July 20th, 2005 10:38 AM