table scrollbars

J

JJ

I want scroll bars on the side of table, but when do it with <Div
class="table"> I loose my formating, It does gives the scrollbars with the
div tag.

What do I need to change?

Thanks
JJ


<table class="table">

<tr>
<td class="odd" height="33">
<a target="_blank" href="xx.htm">2006</a></td>
<td class="odd" height="33">2-25-06</td
</tr>
</table>

-----CSS----

..table {
border: 5px ridge #274573;
color: #000000;
border-collapse: collapse;
padding: 0px;
border: 1px;
font-size: 100%;
margin: 0px 0px 0px 80px;
text-align: center;
overflow: auto;
height: 100px;

}
 
S

Steve Easton

You don't need to add the: class="table" if you remove the period from
..table in your css. then what you've defined will automatically apply to each table

table {
border: 5px ridge #274573;
color: #000000;
border-collapse: collapse;
padding: 0px;
border: 1px;
font-size: 100%;
margin: 0px 0px 0px 80px;
text-align: center;
overflow: auto;
height: 100px;

}


Or

Use a different class name to define the css for the table and then assign the class to
the tables.

It's not a good idea to use a class name that is the same as an html tag name.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
J

JJ

I tried ------<table>----- </table>
the css was just table. I had no scrollbars but formatting was correct.

I tried -----<table class="testtable>---- </table>
the css was .testtable I had no scrollbars but formatting was correct.

I tried ------<Div class="testtable>----- </Div>
I had the scroll bars but lost all formatting.

I missed somthing

JJ
 
R

Ronx

try
<div class="tablescroll">
<table class="testtable">
....
</table>
</div>


CSS

..tablescroll {overflow:auto;width:500px;height:100px;}

..testtable {
border: 5px ridge #274573;
color: #000000;
border-collapse: collapse;
padding: 0px;
border: 1px;
font-size: 100%;
margin: 0px 0px 0px 80px;
text-align: center;
}

Note that your CSS defines the width, colour and style of the table border,
and then removes it.
border: 5px ridge #274573;
is changed to
border: 1px;
which is equivalent to
border-style: none;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top