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
205 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)
Comment Utility
Did u try,

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

Author Comment

by:rederic4
Comment Utility
Yes it seems to make no difference
0
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 500 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rederic4
Comment Utility
that worked thanks!
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
Comment Utility
You are welcome.

:-)
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

772 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

9 Experts available now in Live!

Get 1:1 Help Now