Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
234 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

661 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