how to find table size for all screen in HTML

HI ,

I am design one HTML page ,It contain HTML table
in my computer monitor working fine for all browser but in small monitor or height monitor the alignment are differ .

How to fix the height of the table depends upon the monitor and browser ??
LVL 20
Sathish David  Kumar NArchitectAsked:
Who is Participating?
 
Edwin HofferTechnical ExpertCommented:
Hello dravidnsr,

Make two div just above the table use below code:

#div1 {width:100%;margin:auto;}
.div2 {width:1150px;margin:auto;}

Open in new window


Make sure you are using id in 1st div and class in 2nb div. Also you can change the total width of the div.

If you still need any help feel free to ask.

Thanks
Edwin
0
 
Dave BaldwinFixer of ProblemsCommented:
You can make a table adjust to the available screen by using percentages to set the sizes.  Or even by not setting any sizes.  Tables will automatically adjust when you don't set any sizes.  Can you show us the code for your table?
0
 
Sathish David Kumar NArchitectAuthor Commented:
ya i gave 90% height only ? but its not working ...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Sathish David Kumar NArchitectAuthor Commented:
edwin where i want to close the dive above ??
0
 
Edwin HofferTechnical ExpertCommented:
Close it after the table class
0
 
Sathish David Kumar NArchitectAuthor Commented:
<div id=1 stsyle={width:100%;margin:auto;}>
   <div id=2 stsyle={width:1150px;margin:auto;} >
       <table></table>
   </div>
</div>

is this correct ??
0
 
Edwin HofferTechnical ExpertCommented:
Yes try this.
0
 
Pravin AsarPrincipal Systems EngineerCommented:
This works for me.

<!DOCTYPE  HTML>
<html>
<head>
    <style type="text/css">
        html, body, div.container { height: 100%; background:lime }
    </style>
</head>
<body>
<div class="container">
    <table style="height: 100%;background-color: #ff9933; ">
        <tr>
            <td>FULL PAGE</td>
        </tr>
    </table>
</div>
</body>
</html>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.