Jump to content

Having a horizontal scroll bar for a list box


Recommended Posts


<style type="text/css">



height : 70px;

overflow: auto;







echo("<Select size=3 MULTIPLE style=width:'235px' style=font-size:'9pt' onchange='getMedia(" . $rows['id'] . ")' name='" . $rows['id'] . "_t[]' id='" . $rows['id'] . "_t'>");


This doesnt do what i want. I have a listbox, and the words get really long, and I need a horizontal scroll bar in order to let the user see what is all there. Please help!

Link to comment
Share on other sites

style=width:'235px' style=font-size:'9pt'

Well that doesn't work is quite logical as you seem to be making up a new syntax. (Or at least I'm not familiar with it and neither is the Konqueror browser).


Styling selects is a pain in the rear (well all forms are hard to style) so try this:


<div style="width: 235px; overflow: auto;">
  <select size=3 MULTIPLE style='font-size: 9pt'>
    <option>Man this option is really really long,  it doesn't even fit! on this line and scrolling is required..</option>


Looks a bit odd in firefox with the scrollbar on the side, and it seems to be unkillable.

You could use the title attribute on the options to provide the full description as a tooltip instead of making it scrollable.

Link to comment
Share on other sites

Don't have access to internet explorer atm (side affect from running linux on 3 systems) so I'm guessing it is as the last solution worked for me in Opera, Firefox and Konqueror (konqueror is webkit, so I assume it would work in safari/chrome as well).

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.