473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Backgrounds...

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...

Nov 8 '08 #1
9 1495
Barely Audible wrote:
Quick question...
A "quick question" is usually a hasty question that does not describe the
real problem.
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/

Nov 8 '08 #2
In article <6n************@mid.individual.net>,
Barely Audible <so*******@overthe.rainbowwrote:
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
Nov 8 '08 #3
dorayme wrote:
In article <6n************@mid.individual.net>,
Barely Audible <so*******@overthe.rainbowwrote:
>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!
Nov 9 '08 #4
"Barely Audible" <so*******@overthe.rainbowwrote in message
news:6n************@mid.individual.net...
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.

Nov 9 '08 #5
In article <6n************@mid.individual.net>,
Barely Audible <so*******@overthe.rainbowwrote:
dorayme wrote:
In article <6n************@mid.individual.net>,
Barely Audible <so*******@overthe.rainbowwrote:
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?

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...]

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
Nov 9 '08 #6
In article <gf**********@registered.motzarella.org>,
"Nik Coughlin" <nr******@gmail.comwrote:
"Barely Audible" <so*******@overthe.rainbowwrote in message
news:6n************@mid.individual.net...
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
Nov 9 '08 #7
rf

"Barely Audible" <so*******@overthe.rainbowwrote in message
news:6n************@mid.individual.net...
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.
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.
>
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.
Nov 9 '08 #8
Barely Audible wrote:
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/

Nov 9 '08 #9
Nik Coughlin wrote:
"Barely Audible" <so*******@overthe.rainbowwrote in message
news:6n************@mid.individual.net...
>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!
Nov 9 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RoDzZzZ | last post by:
when i try print (ctrl +p) my webpage, my printer not print the backgrounds and bgcolors of my tables.... what i need make to show the backgrounds and bgcolors in my paper when the user print...
2
by: Greg Locke | last post by:
Hi All I am programming MFC Visual C++ using Microsoft Visual Studio.net 2003 under Windows XP professional. I have developed some bitmaps as graphic overlays for buttons. I had trouble finding...
6
by: MLH | last post by:
I have a logo image that I can paste into MS Paint as an image with clear background. Think of the logo as a black circle in a white, rectangular background. When I paste into Paint, the white...
0
by: ghadley_00 | last post by:
Hi, Have created 2 seperate reports that have different images as backgrounds. Would like to have both pages print out as 1 print job (so duplex printer will make each report page on opposite...
6
by: Rik Brooks | last post by:
I'm developing Web Applications with C# code behind. I have found that, because of the particular nuances of my company, I am stuck with positioning the items on the page with tables. No problem...
1
gregerly
by: gregerly | last post by:
I'm a total flash / actionscript newbie. I have a question about how to create a flash background as seen here: Adobe MAX I don't expect a detailed explanation. I'm just looking for some info...
1
by: alice | last post by:
I'm trying to have a background image in a div, then have several divs within that div that have black backgrounds. The problem I'm finding is that in Firefox and Safari, the first background image...
1
by: matturn | last post by:
Is there any way to get IE7 to render the whole viewpoint without forcing a page reload? If you set a DIV to 100% wide or high, and give it a background; that background will not be rendered if it...
2
duhcoolies
by: duhcoolies | last post by:
I have a table-cell (width=!00%) with a background (BG1), and within this table-cell I have another table-cell (again width=100%) with another background (BG2). BG1 needs to be tiled horizontally...
6
by: Johan | last post by:
I can set/change a background with: document.getElementById("photodiv").style.background = "#282828 url(../img/pict_1.jpg)"; How do I set/change multiple backgrounds using javascript?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.