Solved

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

Posted on 2008-10-16
5
245 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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
The goal of the tutorial is to teach the user how to use import presets downloaded from the internet into Adobe Lightroom. Once you downloaded the presets go into the preset folder and press import then import your preset and your set it to go.
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

752 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