Solved

centering .gifs and text in table

Posted on 2003-10-31
6
190 Views
Last Modified: 2010-04-25
Ok I have .gifs and text.  I need to center them either in a table or not.  Just have to all be centered.  They go like this.
x = 320 pixels wide
o = 170 pixels wide
t = random text length

need colomns that look like this but x has to always be centered on the page.

t | x | o
o| x | t
t | x | o


Now If the text was always the same length this wouldn't be a problem but the time it would take to create not to mention the pageload speed would be to much to put the text into the same size .gif.

0
Comment
Question by:livegirllove
6 Comments
 
LVL 5

Expert Comment

by:zenlion420
ID: 9661769
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" height="248" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="320" height="247" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table> </td>
    <td><table width="320" height="247" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    <td><table width="320" height="247" border="1" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

aloha,

j

0
 
LVL 5

Expert Comment

by:zenlion420
ID: 9661912
p.s. - all of the nested tables are adjustable, but i would just leave them be, and use the text/align command to center the data in the left and right columns.

j
0
 
LVL 23

Expert Comment

by:adilkhan
ID: 9662035
livegirllove, All you have to do this Create 3 Cells.
on the Right and Left hand Cell put what ever you want.
And the One in the Center use the Align Attribute
And Define the Table and Cell Dimenstions.

<table width = 320><tr>
<td width=10> I am on left</td>
<td width = 300 align = Center> I am in Center </td>
<td width = 10> I am on right </td>
</tr></table>
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 8

Accepted Solution

by:
klykken earned 500 total points
ID: 9663181
Here you go livegirllove,
Modify this as you want to, I'm thinking of table border and cellpadding/cellspacing.

<html>
<head>
<title>Centered Table</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="660" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="170">Lorem ipsum dolor sit amet, consectetuer adipiscin</td>
    <td width="320">&nbsp;</td>
    <td width="170">&nbsp;</td>
  </tr>
  <tr>
    <td width="170">&nbsp;</td>
    <td width="320">&nbsp;</td>
    <td width="170">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh</td>
  </tr>
  <tr>
    <td width="170">rem ipsum dolor sit amet, consectet</td>
    <td width="320">&nbsp;</td>
    <td width="170">&nbsp;</td>
  </tr>
</table>
</body>
</html>

Let me know if this works for you.

-klykken
0
 
LVL 1

Author Comment

by:livegirllove
ID: 9663524
I accepted klykken's answer because it was the least complicated.  zenlion420- I tried yours and it worked but I didn't want to deal with nested tables.
thanks all!!
0
 
LVL 5

Expert Comment

by:zenlion420
ID: 9664176
:)  np
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

16 Experts available now in Live!

Get 1:1 Help Now