Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 29, 2008 - VOTE for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 06, 2008, 05:40:51 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: "Infobox" amid text  (Read 107 times)
nwwaew
Trekkie
**
Offline Offline

Posts: 10


« on: June 18, 2008, 08:01:16 PM »

I'm currently designing a website, using PHP and MySQL for a backend, along with HTML to format everything.

One component of the site is an "infobox" that provides a general summary of some facts from the page. This is generated from database information, and is displayed and formatted with PHP.

The problem is how I currently have it set up. I have one large table that is as wide as the page, with 0 pixels in border with, that has two cells. One cell is two-thirds of the table wide, and is where the body (the main part of the page) goes. This is generated by PHP.  The second cell in that table has another table in it, to provide a border for the box.

The problem is, when the page comes up, there's a huge white space, since I'm dividing the page with tables. I want to be able to have the infobox off to the side, and wrap the article text around it. How can I do this?

This is the page in question, and here's example HTML code of how the tables are exactly set up:

Code:
<table style="text-align: left; width: 100%;" border="1"
 cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td>
      <table style="text-align: left; width: 100%;" border="0"
 cellpadding="2" cellspacing="2">
        <tbody>
          <tr>
            <td>Cell 1</td>
            <td style="width: 400px;">
            <table style="text-align: left; width: 100%;"
 border="1" cellpadding="2" cellspacing="2">
              <tbody>
                <tr>
                  <td>Cell 2B</td>
                </tr>
              </tbody>
            </table>
            </td>
          </tr>
        </tbody>
      </table>
      </td>
    </tr>
  </tbody>
</table>
Logged
scanman20
Master Jedi
*****
Offline Offline

Posts: 1247



WWW
« Reply #1 on: June 19, 2008, 08:05:16 AM »

You mean like this?

Code:
<div id="sidebar" style="float:right; border:1px solid #CCC;margin: 0 0 10px 10px;padding:10px">
<b>Overview:</b><ul>
<li><b>Gross tonnage: </b>31550 tons</li>
<li><b>Length: </b>31550 feet</li>
<li><b>Width: </b>87 feet</li>
<li><b>Propulsion: </b>Steam turbines geared to quadruple screw</li>
<li><b>Speed: </b>25 knots</li>
<li><b>Built: </b>1907, by John Brown and Company Limited, Clydebank, Scotland</li>
<li><b>Demise: </b>Torpedoed and sunk off the Irish coast, May 7, 1915</li>
</ul>
</div>
<div id="content">
<p align="justify">
<img border="0" src="../images/ships/lusitania-01.jpg" align="left" width="320" height="139" />The
<i>Lusitania</i>, in a sense, was the result of J.P. Morgan's interest in creating
a monopoly of the transatlantic liner business, which was known as the International
Mercantile Marine, or IMM.&nbsp; Morgan, in 1902, was purchasing line after
line, and then eventually the White Star Line.&nbsp; When White Star was bought
by Morgan, and thus became American-owned, the British Parliament acted, because
they did not want their other great shipping company, the Cunard Line, to become
American-owned as well.&nbsp; As a result of Parliament's action, the Cunard
Line was given a twenty-year contract, which in return for a pledge to remain
strictly British-owned, provided the funds needed to build the world's two largest
and fastest liners.</p>
<p align="justify">These two ships were the <i>Lusitania</i> and <i>Mauretania</i>.&nbsp;
The <i>Lusitania</i> was the first of the pair, coming out of the John Brown
&amp; Company's Clydebank yards.&nbsp; However, there was a major problem that was
found in her trials, which had to be corrected immediately.&nbsp; When traveling
at high speed, the stern area vibrated
<img border="0" src="../images/ships/lusitania-05.gif" align="right" width="240" height="220" />violently.&nbsp;
As a result, the area had to be completely gutted, and every means of strengthening
and support had to be installed in order to correct the defect.</p>
<p align="justify">The <i>Lusitania</i> was the first major liner to use turbines
as her means of propulsion.&nbsp; Yes, liners had previously used turbines,
but not liners of this scale.&nbsp; The decision to use turbines came with another
pair of Cunard ships, the <i>Caronia</i> and the <i>Carmania</i>.&nbsp; The
two were made as identical as possible, with the exception of their machinery.&nbsp;
The <i>Caronia</i> used quadruple-expansion engines, and the <i>Carmania</i>
used turbines.&nbsp; On their sea trials, the <i>Caronia</i> performed with
a service speed of 19.7 knots, with a clean hull.&nbsp; <i>Carmania</i>, on
<img border="0" src="../images/ships/lusitania-02.gif" align="left" width="240" height="169" />
the other hand, exceeded that speed by nearly a knot, and that was with a dirty
hull.&nbsp; Thus the <i>Lusitania</i> and <i>Mauretania</i> would be powered
by turbines.</p>
<p align="justify">The <i>Lusitania</i>'s primary goal was to win back the Blue
Riband from the Hamburg-America liner <i>Deutschland</i>, which had set a record
in July 1900 of 22.84 knots.&nbsp; At this, <i>Lusitania</i> was successful,
winning the Riband on her second voyage, with an average speed on 24 knots.&nbsp;
Also like the German liners, she was to have four funnels.&nbsp; However,
<img border="0" src="../images/ships/lusitania-03.gif" align="right" width="170" height="240" />
unlike the German liners, her funnels were to be evenly spaced across her, and
not in pairs like the German liners.&nbsp; Of the fourteen four-stack liners,
she was the first to sport her stacks evenly spaced.</p>
<p align="justify">Besides setting records in speed, and setting a trend for
future four-stack liners, the <i>Lusitania</i>, like the <i>Mauretania</i>,
set the standard for beauty in ocean liners as well.&nbsp; Their stems were
sleek and straight, their bridges were rounded to perfection, their superstructures
were low, and topped with four slightly raked funnels.&nbsp; Furthermore, she
had a very sleek counter stern.&nbsp; The <i>Lusitania</i>, however, had a slight
edge in beauty compared to her sister.&nbsp; The <i>Lusitania</i>'s air vents
were of a different design than the <i>Mauretania</i>'s, which made them smaller
<img border="0" src="../images/ships/lusitania-04.gif" align="left" width="171" height="240" />and
less visible, and this served to make the funnels appear taller.</p>
<p align="justify">The <i>Lusitania</i> and the <i>Mauretania</i> continued
to break each other's records, with the Blue Riband passing between the two
of them with regularity.&nbsp; The <i>Lusitania</i> was first to average 25
knots, and then soon enough, both of them were sailing at over 26 knots, and
were improving on their records by a minute here, a minute there, etc.</p>
<p align="justify">The duo of <i>Lusitania</i> and <i>Mauretania</i> became
a trio in 1914 with the entry of the four-funnel <i>Aquitania</i>.&nbsp; However,
this was not to last but for a few crossings.&nbsp; World War I soon began,
and plans were made (though later abandoned) to turn these ships into armed
merchant cruisers.&nbsp; <i>Mauretania</i> and <i>Aquitania</i> were seized
by the British government for the war effort.&nbsp; <i>Lusitania</i>, however,
remained in Cunard service, though for added security, her funnels were changed
from the traditional Cunard red-and-black to all black, she flew no flag, and
her name was painted out.</p>
<p align="justify">On May 1, 1915, the German Embassy ran an advertisement in
American newspapers which warned the traveling public of the dangers of using
British-flag liners, due to the fact that a state of war existed between Germany
and Great Britain.&nbsp; Because of this, these ships were subject to possible
destruction by German submarines, or U-boats.&nbsp; However, the <i>Lusitania</i>'s
passengers were not concerned.&nbsp; Though one of her boiler rooms was shut
down in order to conserve fuel, she could still easily make 21 knots.</p>
<p align="justify">She set sail, with 1,959 people, a majority of whom were
Americans.&nbsp; On May 7, the <i>Lusitania</i> neared the Irish coast.&nbsp;
Captain William Turner had been warned of lurking submarines by the Admiralty
earlier that day.&nbsp; The <i>Lusitania</i> encountered fog while thirty miles
out.&nbsp; Turner ordered her slowed down to 18 knots, but still, this was an
opportunity, because due to the fog, <i>Lusitania</i> was unable to be seen
unless one was almost right on top of her, providing a haven from submarines.</p>
<p align="justify">At 11:30 AM that day, the Irish coast was visible, and the
weather had cleared up, as the voyage was nearing its end.&nbsp; However, the
captain of German submarine U-20, Walther Schwieger, had other plans for her.&nbsp;
At 2:12 PM, the <i>Lusitania</i>'s crew spotted the track of a torpedo, which
hit the ship just aft of the bridge.&nbsp; <i>Lusitania</i> shook violently
as a result, but the worst was still to come.&nbsp; A second explosion, caused
by the ignition of coal dust in her mostly-empty coal bunkers, rocked the ship
tremendously, knocking out power, and creating a large blast of water and the
like going up out of the water.&nbsp; Furthermore, a gigantic hole was left
in the <i>Lusitania</i>'s hull, and she began to sink by the head.</p>
<p align="justify">On board, panic broke out, and because of this, lifeboats
were lowered in utter confusion.&nbsp; Due to the list, passengers had to jump
into them from the starboard side, as they were further out than normally, and
on the port side, the lifeboats were scraping along her hull, causing the breakage
of many a lifeboat, plunging their occupants into the sea.&nbsp; Eighteen minutes
later, the <i>Lusitania</i> was on her starboard side at the bottom of the sea,
taking 1,195 people with her.&nbsp; However, all was not lost for those who
survived the sinking.&nbsp; Fishing boats came and rescued those who had survived,
and brought them ashore.</p>
<p align="justify">But that was not the end of the Lusitania by any means.&nbsp;
While the <i>Lusitania</i> herself was gone, her spirit lived on, further encouraging
the Americans to eventually join World War I on the side of the allies.&nbsp;
The sinking also created considerable uproar against Germany because she was
sunk without warning, sending over a thousand innocent people to their deaths.&nbsp;
The &quot;Take up the sword of justice&quot; poster at right serves to illustrate this
feeling, which was prevalent after the <i>Lusitania</i> went down.</p>
<p align="justify">
<img border="0" src="../images/ships/lusitania-06.gif" align="left" width="203" height="280" />The
news media also covered the sinking's happening, and its aftermath.&nbsp; Both
sides of the war ran stories on the sinking.&nbsp; The New York Times warned
of an impending grave crisis.&nbsp; English tabloids denounced the Huns, accusing
them of murder.&nbsp; German newspapers covered the story from their point of
view.&nbsp; Note that in the German newspaper shown at left that the ship depicted
in the picture is in fact not the <i>Lusitania</i>, but is the White Star liner
<i>Titanic</i>!</p>
<p align="justify">The <i>Lusitania</i> now lies on her starboard side, and
is slowly deteriorating, now being only half of her original beam, with the
superstructure slowly sliding onto the ocean floor, and her funnels completely
rusted away.</p>
</div>
Logged

Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP
nwwaew
Trekkie
**
Offline Offline

Posts: 10


« Reply #2 on: June 19, 2008, 03:25:14 PM »

EXACTLY what I was looking for! Thanks!  Very Happy Thumbs Up Clapping Bouncin for Joy
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM