How do I get a table in HTML to not move when the browser is resized?

geeta_m9
geeta_m9 used Ask the Experts™
on
I have a Web page that has a template with a list of menu options on it on the left-hand side of the page. I also have a table with some contents in it next to the menu.  I would like the table to stay on the left side of the page next to the menu. However,  if I drag the right edge of the browser to make it bigger, the table moves along with it resulting in a gap (whit space) between the menu and the table. How do I make the table stay put on the left side of the page even if I resize the browser to make it bigger?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Set the width of the table to a specific size in pixels.

<table style="width:500px;">
</table>

Author

Commented:
It has already been set to 582px, i.e.:

<tr style="HEIGHT: 12.75pt" height="17">&nbsp;
<table style="WIDTH: 582px; HEIGHT: 238px" cellSpacing=0 cellPadding=0 align=center border=0>
<tbody>
<tr>
.
.
.

Commented:
So, the table is staying the same size, but it is moving away from the menu on the left?

Sounds like the div that the menu is inside of is expanding.  Try setting the width on that.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Does that mean that I have to adjust the template?
Commented:
Yes, it sounds like the column that divides the menu from the content is sized as a percentage of the browser width.  So, when the browser is resized, both columns grow.  Since the menu isn't getting wider, it looks like a gap is being created.  The gap is the margin between the right edge of the menu and the right edge of the container that holds the menu.

Author

Commented:
Your answer makes a lot of sense. I will try working on it and get back to you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial