Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

centering .gifs and text in table

Posted on 2003-10-31
6
Medium Priority
?
233 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
[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
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:Saqib Khan
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
[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

 
LVL 8

Accepted Solution

by:
klykken earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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 …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

597 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