i cant get the table to cover the whole page in height. so when you use different sizes of moniotrs. it always covers the height size.

i have it so width=500
and it is centered. thanks if any1 can help

Recommended Answers

All 9 Replies

Can you not set it to height="100%"?

Are you setting the table properties in the html or a css file?

yeha i set height to 100 in html code. what does the auto property do for height?

Make sure that you include the percent sign (%) after 100 so that it looks like height: 100%;

So you'd use something like: <table height="100%" width="500" align="center"> That would set the height to 100% of the window and the width to 500 pixels, this would change the height depending on the size of the screen but the width will stay the same.

Hope thats what you're after

otherwise you can also try min-height="100%"

Yep, what MJ said should work. Here's an example:

<table style="min-height: 100%; height: 100%; width: 500px; margin: 0 auto; border: 1px solid black;">

Defining an absolute width then margin: 0 auto is a better way to center any block element.

margin: auto allows the browser to adjust the margin as needed, sticking stuff in the center. I don't think you can specify %'s in the width attribute, only in the style property.

Hi,

if you want your webpage hieght or widht to fit into your browser give height or width in percentize(100%)

You can not set the size of something to exactly fit the height of the browser window in a way that works on all browsers. Do not waste your time trying to do this.

When width and height conflict in the sizes they need for an object, width has priority over height.

With some browsers, 100% height is 100% of the height of the document, not the browser window.

The display of web pages is not intended to exactly fill the screen in the vertical direction. This use was never intended. It is designed to expand downward until all of the content is rendered.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.