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

Background image annoyance.

GazMathias
228 Expert 128KB
Hi,

I'm writing a system which will use a designer to style the customer facing stuff, but I'm styling the admin bits myself. I have set a 600 x 4px gradient

image to fill the body:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.     background-image:    url('/assets/image/admin_bg.png');
  3.     margin:                0 auto;
  4.     font-family:        Lucida Grande, Verdana, Sans-serif;
  5.     font-size:            12px;
  6.     color:                #000;
  7. }
All of my admin content goes into a div called #content:

Expand|Select|Wrap|Line Numbers
  1. #content  {
  2.     width:                 660px;
  3.     margin:             0 auto;
  4.     margin-top:         40px;
  5.     border:                #999 1px solid;
  6.     background-color:    #fff;
  7.     padding:            12px;
  8. }
My problem, is that frequently on page load the background image is only visible adjacent to the sides of the content div with whitespace above and below (see pic). Refreshing the page sometimes cures it and hovering over a link magically makes it fill the page, too!

This behaviour is manifesting in Chrome and IE7, but curiously not FF 3.5?

Gaz
Jul 22 '10 #1
3 1377
drhowarddrfine
7,435 Expert 4TB
You probably need to set height/width to the body element. In this case, 100% for each may suffice.
Jul 22 '10 #2
GazMathias
228 Expert 128KB
Hi

Thanks for your suggestion, however it did not work.

What seems to do the trick (for now) is:

Expand|Select|Wrap|Line Numbers
  1. background-repeat: repeat;
  2.  
I thought that was the assumed default?

Gaz
Jul 22 '10 #3
drhowarddrfine
7,435 Expert 4TB
'tis not but I misunderstood your question.
Jul 22 '10 #4

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

Similar topics

2
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all...
4
by: Dj Frenzy | last post by:
Hi, I know how to use javascript to change a background image to another background image, and how to change a background colour to another background colour. Is there a way to change an image to a...
2
by: day | last post by:
I'm trying to use a non-scrolling background image within a div (the non-scrolling part is a "nice-to-have" vs a "have to have"). The style for that is: <div style="height=400px;...
4
by: lindsey.crocker | last post by:
I have this links list with background images set on them which changes when they roll over. The <td> is set valign="middle" however as soon as you apply the rollover to the link, the text jumps...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
3
by: DexHex | last post by:
Hi, I am stumpt. Is there anyway to set the background image on a webpart title?
3
by: KNDesign | last post by:
I've set a background image to repeat-y and at 100% height. It appears fine when I open the window, but when I resize to a smaller height so that I must scroll down to see the rest, the background...
16
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.