Solved

centering .gifs and text in table

Posted on 2003-10-31
6
195 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

22 Experts available now in Live!

Get 1:1 Help Now