473,406 Members | 2,713 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,406 software developers and data experts.

How do i put a backgroun-image in a division?

Hi all

Firstly I want to apologize for the bad looks of my scripting, but I am a beginner and still fooling around, I know of the www.w3.org stuff that must be here but will add later.

please help me with the following? I am trying to insert an background-image into the middle division of the page but it doesn't want to show. what am I doing wrong?

regards



Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <title></title>
  4.  
  5. <head>
  6.  
  7. </head>
  8.  
  9. <body bgcolor="#f5f5dc">
  10.  
  11. <div style="width: 1000px;" />
  12. <div style="width: 150px;float:left;"></div />
  13. <div style="width: 800px; background:url('bg_images/imagesCADKEXJW.jpg;');" /></div />
  14. <div style="width: 50px;float:right;"></div />
  15.  
  16. </body>
  17. </html>
Dec 20 '11 #1
1 1972
drhowarddrfine
7,435 Expert 4TB
You need to give the empty div elements a height and width. Also note the fixes where you have too many slashes.
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. </head>
  6.  
  7. <body bgcolor="#f5f5dc"> bgcolor is deprecated. Use CSS.
  8.  
  9. <div style="width: 1000px;">
  10. <div style="width: 150px;float:left;"></div>
  11. <div style="width: 800px; background:url('bg_images/imagesCADKEXJW.jpg;');"></div>
  12. <div style="width: 50px;float:right;"></div>
  13.  
  14. </body>
  15. </html>
Dec 20 '11 #2

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

Similar topics

15
by: shyren | last post by:
Hi All, I have a php program which calls a c++ program using exec. However when user presses stop button in the browser or closes it this program keeps on running on the server. How can I stop it...
0
by: quantum | last post by:
Hi guys, I am trying to switch "background printing", which can normally b reached from Tools>InternetOptions>Advanced>Printing. I am trying to d this programmatically in vb.net (This is not a web...
3
by: Peter Strřiman | last post by:
Hi. I have a web application that needs to run tasks at regular intervals. E.g. it must send out emails every night to people who subscribe to that service. I have come up with one solution,...
40
by: Mark | last post by:
Hello i like to make the following lay out: - 3 columns - center column = fixed width - left and right columns are not fixed and must take all the available space there is left. - left...
7
by: Joe | last post by:
I need a control to always run in a separate thread from the application. I'm not too sure where to begin with this since the control could be dropped on the form at design time. One possible...
10
by: Ryan | last post by:
I'm creating a website that monitors the status of servers using My.Computer.Network.Ping. I'm looking for a way to fire off my Ping() function every second or so. I see a Timer control...
6
by: Can Uzun | last post by:
Hi; sorry if this is a re-post. My question is basically this... When you receive an email and you already have a GMail page open, it shows you the new mail without refreshing (or it does that...
0
by: =?Utf-8?B?QW5kcmV3?= | last post by:
I have a borderless form that has a transparent background. I only wanted the color that I painted the background with to be transparent and not the controls on the form or the box I draw in the...
5
by: nospam | last post by:
Hi all. I have encountered a "Cross-thread operation not valid" error in a test program I created and although I have came up with a solution I don't like the performance of the program. I...
13
by: Godzilla | last post by:
Hello, How do you create/spawn new processes in XP over telnet using python? I.e. I would like to create a new process and have it running in the background... when I terminate the telnet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.