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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.