?
Solved

I need some help fixing this table width please

Posted on 2009-07-06
6
Medium Priority
?
130 Views
Last Modified: 2012-05-07
Hi There,
I have a table that fits beautifully in my CMS webpage.
When the client updates this table, I do not want the table to extend beyond 719px.
How can I alter this code below to ensure that no matter what the table will stay at that width.
Ideally I would like the height to remain the same too, but I am thinking this could be impossible?
I tried this:
<table style="max-width:350px;">
but I am not sure I added it correctly in the below code, because when I went to edit the table, the text stretched the table width
?
<table border="1" width="719" height="328"><tbody><tr><td colspan="5"><p> <strong><font face="arial,helvetica,sans-serif">FIXTURES AND RESULTS - <em>Northern Rivers Village Information</em></font></strong></p></td></tr><tr align="center" valign="middle"><td><p><strong><br /> </strong></p></td><td><p><strong> DATE</strong></p></td><td><p><strong> MATCH</strong></p></td><td><p><strong> VENUE</strong></p></td><td><p><strong> RESULT<br /></strong></p></td></tr><tr><td> 1</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 2</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 3</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 4</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 5</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 6</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 7</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 8</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 9</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 10</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 11</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 12</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 13</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 14</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 15</td><td> </td><td> </td><td> </td><td> </td></tr><tr><td> 16</td><td> </td><td> </td><td> </td><td> </td></tr></tbody></table><p>&nbsp;</p>

Open in new window

0
Comment
Question by:Amanda Watson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

by:lharrispv
ID: 24789291
the code you have should do the trick.  If not give me more details of what is making it grow and I will look.
0
 
LVL 14

Expert Comment

by:amichaell
ID: 24789309
I'm not HTML guru, so take this with a grain of salt...

As far as I know specifying the width as you've done sets the absolute width of the table in pixels (or percentage if you choose).  Since you specified 719 the table should not grow beyond that width.  

There is a height command available within the <td> element.  <td height="">.  Works the same as width (pixels or percentage).
0
 
LVL 2

Expert Comment

by:grvulture
ID: 24789317
<table style="max-width:350px !important;">
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 11

Author Comment

by:Amanda Watson
ID: 24789926
hi grvulture where do I add that?
Like this?

<table style="max-width:350px !important;" border="1" width="719" height="328">

or
<table style="max-width:350px !important;"> <table border="1" width="719" height="328">
?
0
 
LVL 2

Accepted Solution

by:
grvulture earned 2000 total points
ID: 24790031
first choice would be right.

both choices should NOT let your table grow beyond 350pixels, even if you have a width statement of 719
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 24791109
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question