Solved

Why can't I enter a table into this background file, without pushing the background downward?

Posted on 2008-10-16
5
246 Views
Last Modified: 2013-12-02
Here is the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html template="true">
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Famous Computer Scientists &amp; Mathematicians</title>
  <meta content="BML" name="author">
  <meta content="Background template" name="description">
</head>
<body>
<table border="1" cellpadding="2" cellspacing="2"
 width="100%">
  <tbody>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>
<img alt="Blue Background"
 src="file:///C:/Users/blerman/Documents/ED569.A/web_page_ed569/background.gif"
 height="1200" width="1600">
</body>
</html>
0
Comment
Question by:blerman456
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:brundo
ID: 22733152
Hi,

you have the image immediately after the table.

You can add the background via style attribute in the body or table tag - depending or where you want the background:

  <body style="background-position: 0% 0%; background-image:url('relativepath/imagename.gif'); background-repeat:no-repeat; background-attachment:scroll">

or

  <table border="1" cellpadding="2" cellspacing="2" style="background-position: 0% 0%; background-image:url('relativepath/imagename.gif'); background-repeat:no-repeat; background-attachment:scroll" width="100%">

Url could be

  url('filename.extension')

if the background picture is in the same folder as the HTML file, or something like

  url('aaa/filename.extension')

if the background file filename.extension is in the subfolder of the folder where the HTML file residues, and its name is aaa.

0
 

Author Comment

by:blerman456
ID: 22733568
What does the % sign mean in the below part of your answer:

 <body style="background-position: 0% 0%; background-image:url('relativepath/imagename.gif'); background-repeat:no-repeat; background-attachment:scroll">
0
 
LVL 13

Accepted Solution

by:
brundo earned 500 total points
ID: 22733656
Try following combinations instead of 0% 0%:

50% 0%0% 50%50% 0%
Do you see :-)) ?

Instead of 0% 0% can stay 0 0 (in pixels) or top left, but I had something else in mind...

More about background positioning you can find on the page http://www.w3schools.com/css/pr_background-position.asp.
0
 

Author Closing Comment

by:blerman456
ID: 31506746
This guy is great.  I assume he is a guy - is that correct?  So very very smart.
0
 
LVL 13

Expert Comment

by:brundo
ID: 22738505
No, not a guy... female... Only my nickname is a male bear name :-))
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PaperPort is a popular document imaging/management product from Nuance Communications (http://www.nuance.com/). It is in widespread use by both individuals (http://www.nuance.com/for-individuals/by-product/paperport/index.htm) and businesses (http:/…
In a previously published article (http://www.experts-exchange.com/articles/10331/Automatic-Duplex-Scanning-in-PaperPort-Versions-11-12-14.html) here at Experts Exchange, I explained how to achieve duplex (double-sided) scanning in Nuance's PaperPor…
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
The goal of the tutorial is to teach the user how to import photos into Adobe Lightroom efficiently and to keep everything organized.
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question