Jump to content

Dropdown Box Width

Recommended Posts

How do we define the width for a Dropdown Box?

My code is:

print("<select name='title'>
         <option style='color:maroon; font-size:bold' name='title'>$title</option>");
    while ($row = mysql_fetch_row($Results))
         {print("<option value=$row[1]>$row[1]</option>");}

All of this works fine except I don't know where to define the width and can't find it in the W3S HRML documentation.

Thank you


Link to post
Share on other sites
  • 2 months later...
print("<select name='title' class='dropdown'> <option style='color:maroon; font-size:bold' name='title'>$title</option>");
while ($row = mysql_fetch_row($Results))
{print("<option value=$row[1]>$row[1]</option>");}
In external CSS file:


Edited by ishan_shah
Link to post
Share on other sites

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.   Paste as plain text instead

  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...