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
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
217 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
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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).

828 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