Solved

Centering a table with a div scroll - Urgent as I am building a new site for my business

Posted on 2006-10-29
8
223 Views
Last Modified: 2010-04-09
Hi,

I'm new and haev been unable to find the answer to this question in your database (but have found many other answers!).

I have a fairly siimple html page in which I have created a scroll bar inside a table using a div tag. No matter what I seem to try I can not get the table to be centered (it was cented befoer I added the div tag). I am using IE here is the par tof my code that I think is relavent. Any help is appreciated. I am including center tags I have used after searching you database that do not seem to work.

<div ALIGN=center style="text-align:center;overFlow:auto;width: 700px;height: 400px"><center>

 
<TABLE Align = Center WIDTH=700 BORDER=0 bordercolor="WHITE" CELLSPACING=8 CELLPADDING=0 bgcolor="WHITE">
 <TR>
 <TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></TD></TR></A>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></TD></TR></A>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></TD></TR></A>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></TD></TR></A>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A>
</TD>
</TR>
</Table>
</center>
</div>  
0
Comment
Question by:rederic4
[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
  • 4
  • 2
8 Comments
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 17831813
Did u try,

<div ALIGN="center" style="text-align:center;overFlow:auto;width: 700px;height: 400px">
0
 

Author Comment

by:rederic4
ID: 17831827
Yes it seems to make no difference
0
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 500 total points
ID: 17831920
First thing is you should close the anchor tags, </a> before the </td> tags.

Another thing is, you should increase the width from 700px in the <di> tag , or reduce the table width.

If you are not inclined to changing the width, then, put one more <div> tag.

<div align="center">
<center>
<div ALIGN="center" style="text-align:center;overFlow:auto;width: 700px;height: 400px">
<center>

<TABLE WIDTH=700 BORDER=0 bordercolor="WHITE" CELLSPACING=8 CELLPADDING=0 bgcolor="WHITE">
 <TR>
 <TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A></TD></TR>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A></TD></TR>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A></TD></TR>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A></TD></TR>
<TR>
<TD BGCOLOR="WHITE">
<A HREF="albertcd.html">
<IMG SRC="albertcd.gif" WIDTH=150 HEIGHT=150 BORDER=0 ALIGN=LEFT></A>
</TD>
</TR>
</Table>
</center>
</div>  </center></div>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rederic4
ID: 17831943
that worked thanks!
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 17831957
You are welcome.

:-)
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 17832508
rederic4,

If you are problem is solved, please accept my answer and close this question. See this link for closing this question.

http://www.experts-exchange.com/help.jsp#hi68

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

737 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