Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
240 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
  • 4
  • 2
6 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

773 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