Jul 26, 2008

Setting A Maximum Table Height

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Setting A Maximum Table Height

beeseven
How do I set a maximum table height? I tried height and max-height but neither worked. I need to have it a certain height because more than that height it adds a vertical scrollbar, which adds a horizontal scrollbar because I have an image that's pushing it.

beeseven.trap17.com I want the table that the updates are in to be a certain height with a scrollbar there instead of making it above the page length and adding a main scrollbar.

Reply

grovealum
In all of the browsers I'm familiar with, you don't have control over any maximum parameters in a table. If the image or text you inserted in a table is larger than a cell or table height/width, the table will stretch to accommodate it.

The HTML code you are looking for is not a table. The only way to add scroll bars is with a frame.

One possible option would be making your home page a frameset & putting the navigation buttons in the top frame & the updates in the bottom frame.
http://www.htmlhelp.com/design/frames/usage/


The solution I think you are really looking for is called an inline frame.
http://www.htmlhelp.com/reference/html40/special/iframe.html

Reply

no9t9
max-height or max-width exist but are not supported by many browsers. I think only opera supports those (don't quote me on that though).

anyway, the way I see your post is this... You are asking 2 things.
1. you have an image that you dont want to scroll (image is in a table cell).
2. You want your text in your news section to scroll but not the page.

answers
1. if you have an image inside a table and you don't want scrollbars, put everything in the table cell inside a div.
Example:
<table><tr><td>
<div style="overflow:hidden;width:10px;height:10px">
<img src="yourpic.jpg"></div></td></tr></table>

Change the width and height to the size of the picture. The overflow:hidden removes scroll bars (just in that area and not the whole page).

2. To get a scroll bar just for your news section, you use DIV's again.
Example:
<div style="overflow:auto;height:400px;width:400px">
Your news and junk
</div>

This will make a box with width 400 and height 400 pixels. The scroll bar shows up only if the text is longer than 400 pixels.

 

 

 


Reply

beeseven
Overflow:auto + width and height worked, but I had to make the height absolute. Is it possible to use a percentage with height?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. table height - 6.39 hr back. (1)
  2. controlling table height php - 17.10 hr back. (1)
  3. table max-height - 18.00 hr back. (1)
  4. table settings overflow html - 28.66 hr back. (1)
  5. putting a maximum height on a div - 28.79 hr back. (1)
  6. setting maximum cell height html - 29.24 hr back. (1)
  7. html tables max height - 34.13 hr back. (1)
  8. max height table - 37.52 hr back. (1)
  9. html table max height - 39.39 hr back. (1)
  10. html table height max - 40.87 hr back. (1)
  11. max-height table - 41.39 hr back. (1)
  12. table height image height - 53.75 hr back. (1)
  13. maximum cell width table html overflow - 54.55 hr back. (2)
  14. set maximum table size for page - 63.09 hr back. (1)
Similar Topics

Keywords : setting, maximum, table, height

  1. Setting Margins
    (2)
  2. Table Setting To Stretch
    all the way to both edges (8)
    who knows how to get a table to stretch to both edges??? i need help /sad.gif' border='0'
    style='vertical-align:middle' alt='sad.gif' /> You are warned! You said you read and agreed
    to our forum rules yet you decided to make "I need table help" as your topic title. The topic title
    must be descriptive and not contain "help" included. We all need help but be specific. This is your
    last caution note. Editing topic title. Filled in topic description. ....
  3. Div Child Height Same Height As The Father
    how to set child height to be the same.. (2)
    I will try to explain myself as briefly as possible. I want have the next xhtml squeletone: CODE
    <html>  <head>  </head>  <body>  <div
    id="container">    <div id="header">      <div
    id="searchEngine">        <!-- Search Engine Markup >      </div>
       </div>    <div id="header2">    </div>    <div
    id="primarynav">        <!-- primary nav Markup >    </div>  
     <div id="content....
  4. Popup Window With Height And Width?
    (9)
    I will try to explain: When clicking on the link, a pop-up window will be opened. I also want to
    have the width=300 and height=160 (just examples /wink.gif' border='0'
    style='vertical-align:middle' alt='wink.gif' /> ) Could someone give me a short code for that?....
  5. Adding Width And Height To Page
    (8)
    how do you add width and height to your page? without adding it to your link you previously
    clicked... I mean, that the width and height should be included in the ORIGINAL page... i hope
    someone can help me with this... thanks in advance! /cool.gif' border='0'
    style='vertical-align:middle' alt='cool.gif' /> btw: i'm not that familiar with
    scripting.......

    1. Looking for setting, maximum, table, height

Searching Video's for setting, maximum, table, height
advertisement



Setting A Maximum Table Height



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE