473,394 Members | 1,722 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,394 software developers and data experts.

Can I use both image and color backgrounds?

Haitashi
I'm having a bit of confusion. Hopefully someone can help.

I want to create a box that has an image on the top and has a color background.

Expand|Select|Wrap|Line Numbers
  1. .greenHeader {
  2.     background-image: url(images/0t1.jpg);
  3.     background-repeat: no-repeat;
  4.     vertical-align:top;
  5.         background-color:#E6EED7;
  6. }
What I'm getting from what I pasted above is just the BG color. The background-image property gets completely ignored.

Thanks in advance! ^_^
Apr 3 '08 #1
2 1451
eWish
971 Expert 512MB
This worked for me. I would suggest that you make sure that the path to the images directory is correct.

Expand|Select|Wrap|Line Numbers
  1. body  {
  2.     background-color: blue;
  3.     background-image: url(bg.jpg);
  4.     background-repeat: no-repeat;
  5. }
--Kevin
Apr 3 '08 #2
I don't know if this was why it wasn't working for me but I moved around the properties to match the same order you have your properties setup (placing the background-color attribute before the background-image). Now seems to work fine. Thanks!
Apr 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove...
4
by: boclair | last post by:
Is this a known problem with IE6? I have a provisional two column layout, the left menu column is positioned absolute. The contents column is positioned relative. The contents column has an...
4
by: steven | last post by:
Hi, I have a header which consists of an image with clickable areas. Now since this header appears on all my pages it would make sense to put it as a background-image in my CSS. However, I can't...
5
by: Doug Laidlaw | last post by:
HTML validators say that "background" is not a valid attribute for a <td> tag I want to set an image as the background for one cell only, and to have the cell content on top of it. If I can't...
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...
16
by: eholz1 | last post by:
Hello CSS group, I saw a beautiful effect that I would like to use either by CSS or using photoshop to create the image/effect (maybe even imagemagick) the site address is:...
3
by: d3vkit | last post by:
Okay I've got a problem which wouldn't be a problem if IE was not around, but yeah, IE is giving me trouble. I've got a tag-cloud that is on my page; everything was fine. Sort of like this:...
8
by: JJ | last post by:
Whilst I am resizing images I am losing quality. This is only happening in small amounts, but if you repeatedly put the same image through the following code, the image quality slowly degrades. Can...
5
by: kbnolan | last post by:
I'm somewhat new to this so I know there is something easy I'm missing. I'm editing an existing html page that was built with primarily with css. I have to work with the existing structure and not...
2
by: thephatp | last post by:
I'm having a problem with IE rendering correctly. I'm experimenting with using all div's in my pages now, and I'm not very familiar with the quirks of IE. I have created a sample page, and I'm...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.