MuchaZ
MuchaZ

Reputation: 421

Scrollable table for e-mails (without a div)

Is it possible to create a table with a content scrollable vertically (the table is 600x600)? The only way I know is with using a div which is not possible for e-mails' purposes.

Upvotes: 2

Views: 4778

Answers (2)

Alferd Nobel
Alferd Nobel

Reputation: 3979

I was trying to generate dynamic tables from java code , adding this line of code made the table scrollable inside the email body in Outlook email client.

Embedded Html like so : <div style= 'width:800px; height:400px; overflow:scroll; position:relative;'>

java code looks like :

body.append("<div  style= 'width:800px; height:400px; overflow:scroll; position:relative;'>");
body.append("<table border='1' cellpadding='5' cellspacing='0'>");

    

Upvotes: 0

Renuka CE
Renuka CE

Reputation: 686

You can achieve above by using css.By mentioning this you can achieve the result overflow-Y:scroll (for verticle scroll bar)

table{
  overflow-Y:scroll;
  height:600px;
  }
<table>
  <tr>
  <th>Name</th>
  <th>Age</th>
  <th>EMail</th>
  </tr>
 </table>

Upvotes: 1

Related Questions