Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article discusses the PaperPort 14 Scanner Connection Tool, which Nuance provides at no charge in order to fix scanning problems in Windows 8. Furthermore, users of PaperPort 14 in Windows 7 and Windows 10 have reported that the tool works in t…
I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
In this Micro Tutorial viewers will learn more advanced shortcuts and functions in InDesign.
The goal of this is to tech the user how to export photos out of Lightroom and the different options they have. Select which photos you want to export : Select where you want to export and with which options : Export :

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now