Fixed Table height

  • 19 years ago

    Hi.. Is there a way to lock the table height?


    For example, I've a table with height=120, in this table cell, i'll pull in some data from the database which may be 1 to 3 lines. How can I lock the table or cell height such that no matter it is 1 or up to 3 line.. the table height will stay the same as it is?


    Thank you for you advice.

  • 19 years ago

    second question.. how do I create a textbox without border?

  • 19 years ago

    To get rid of a text box border set the property 'borderstyle' to '0'


    As for the table q, i dunno, never used the control before - that is if it is a control and not vba in excel or somethin.  My only solution would be to check your string for the number of lines it contains and just add character returns to the end of it to make sure its at the required height.  Try something like


    Do while tableheight < 120
        tablestring = tablestring & vbnewline
    loop



    Élwöçk

  • 19 years ago

    Quote:
    [1]Posted by Rozerg on 18 Feb 2002 09:58 PM[/1]
    Hi.. Is there a way to lock the table height?


    For example, I've a table with height=120, in this table cell, i'll pull in some data from the database which may be 1 to 3 lines. How can I lock the table or cell height such that no matter it is 1 or up to 3 line.. the table height will stay the same as it is?


    Thank you for you advice.



    I think you should check the post reply from me at the ASP forum u posted the same question...

  • 19 years ago

    That is a good thing... Posting on multiple sites increases your chances of getting a helpful answer several fold.

  • 19 years ago

    I guess a better approach would be to use style sheets. Type the following in the <head> section:


    <style type="text/css">
    <!--
    .textbox {    BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-RIGHT: medium none; BORDER-TOP: medium none
    } -->
    </style>


    And the textbox definition could be:


    <input type="text" class=textbox>


    Don't forget that the <body> should have a bgcolor different than white in order to obtain the contrast.


    If you are using an external file for your style sheets you may choose to have the <style> definition in that file

  • 19 years ago

    in html tables there is no such thing as scrollbars within cells.. so in case you want the hieght to remain 120 or whatever.. but your text is more.. wher would you liek the extra text to go.. in case there were scrollbars then you could like have a constsant height but you cuold see more text by scrolling..
    but since such thing is not there.. in html tables always the first preferene goes to the content.. if the content is within limits then the sie of the cells come into picture..else ehat happens is that the cells stretch to fit the text..


    so in case you are using this with some other language such as ASP/JSP then cut the string so that it fits in the cell.. maybe you cuould make it a hyperlink..and ppl click on that to get the full text in a new window or something..


    -kiran

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Engineers are all basically high-functioning autistics who have no idea how normal people do stuff.” - Cory Doctorow