• does anyone here know how to make the list boxes in narchives.php to properly expand to the full length of whatever text is contained in them?

    for some reason they are not expanding in width to accomodate a very long author name…

    ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is the place where you are using narchives constraining the display in some way ? Link ?

    Form field width is set manually. To the best of my knowledge, there is no way to make a “fluid” field width that gets wider/narrower as needed. For one thing, this would really look funky in a design.

    Like the settings of a database field, you basically have to come up with a “best guess” of the maximum width you might need. Here’s a link from W3C which explains the attributes of the input element:
    Forms in HTML documents

    Thread Starter thomascarreno

    (@thomascarreno)

    Thanks for the feedback… and the link..

    But I still don’t know what piece of code to add to or adjust in narchives.php so that I can actually set a width of 40 characters?

    What code do I insert in there, and where? For example if I wanted the author field box to be 40 characters in width…

    is this the code I need to change?

    $output = ‘<select name=”author”>’.NL.$output.'</select>’.NL;

    If I add the attribute size=”40″ right after the “author” in the code above, all it does is convert the drop down list box into a 40 row text box showing all authors at once (it expands all the way down to the bottom of the page)

    I dont know what else to change so that the drop down list box in narchives expands to the width of the maximum text.

    In my dreamweaver html reference it stated that in drop down list boxes, the width of the drop down list box is supposed to automatically expand in width to the longest item of text within the list box..

    but again for some reason it is not doing it …

    any other ideas?

    Tom

    Thread Starter thomascarreno

    (@thomascarreno)

    Or maybe I need to tweak some of this code?

    <h2>Show Archives Sorted By:</h2>
    <form action=”<?php getenv(‘PHP_SELF’) ?>” method=”post”>
    <?php show_orderby_select() ?>
    <?php show_order_select() ?>
    <?php show_year_select() ?>
    <?php show_author_select() ?>
    <input type=”submit” name=”submit” value=”sort”>
    </form>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘drop down list box width in narchives’ is closed to new replies.