Solved

apply height to <select> tag of html

Posted on 2009-07-01
11
796 Views
Last Modified: 2012-05-07
how to build custom control that similar to<select> control using some components like <div> or <span> combine with client script such as javascript, to control height easily. otherwise the height attribute is not getting applied through the style. (i want to give the height to select attribute of html)
0
Comment
Question by:arunprasher
  • 6
  • 3
  • 2
11 Comments
 
LVL 17

Expert Comment

by:selvol
ID: 24761335
Adjust the  select font size..
That will adjust the height  respectivly.

Selvol
0
 

Author Comment

by:arunprasher
ID: 24761738
i don't want to increase the font size i want to increase the height of <select> tab
0
 
LVL 6

Expert Comment

by:Tony O'Byrne
ID: 24765140
<select style="height: 500px;">content</select>

The 500px number is just a silly high number for the sake of demonstration.  The 'px' part tells the browser that the number is represented in screen pixels.

Hope this helps.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 17

Expert Comment

by:selvol
ID: 24766323
Don't be so sure and fast to shoot the correct answer down.

I'll tell you again.  Just so you can possibly get a correct answer.
FONT SIZE = SELECT size...



Quaoar, that won't work...

Selvol
<select  style="position:absolute;left:79px;top:176px;width:78px;height:16px;z-index:6; font-size : 355;" align="center">  <b><option>increase</option>
  <option>the font</option>
  <option>EE</option>
  <option>Selvol</option>
</select>
 
<select  style="position:absolute;left:9px;top:76px;width:78px;height:16px;z-index:6; font-size : 25;" align="center">  <b><option>increase</option>
  <option>the font</option>
  <option>EE</option>
  <option>Selvol</option>
</select>
 
 
</body>
</html>

Open in new window

0
 
LVL 17

Expert Comment

by:selvol
ID: 24766435
Unless I am wrong. In that case I apologize.
0
 
LVL 17

Expert Comment

by:selvol
ID: 24766569
As far as I know their is no height attrb. for select.
But it could be done with css hacks to mimic the height of the surronding.

If you had the html fot the for you were trying to get the select to size with.
I'd see if what I can do.
0
 
LVL 6

Expert Comment

by:Tony O'Byrne
ID: 24767201
Not to worry. :-)

After doing some research, it seems that it's just not possible to do it with CSS.  I've seen someone online say that it's a GUI control and it's outside of the user's capability to manipulate like that.

So it seems that selvol's way is the way to go.
0
 
LVL 17

Expert Comment

by:selvol
ID: 24793685

Did you ever get this solved?
Selvol
0
 
LVL 17

Expert Comment

by:selvol
ID: 24793699

Did you ever get this solved?
Selvol
0
 

Author Comment

by:arunprasher
ID: 24801078
As far as I know their is no height attrb. for select.
But it could be done with css hacks to mimic the height of the surronding.

If you had the html fot the for you were trying to get the select to size with.
I'd see if what I can do.

give me logical idea or a code strip with that i could increase the height of select tab we expect a solution because our clients demand it.
0
 
LVL 6

Accepted Solution

by:
Tony O'Byrne earned 125 total points
ID: 25178938
What if...  I don't have the chance right now to test it, but I'll throw the idea out there anyway.

What if you were to follow Selvol's suggestion, *but* just enlarge an "&nbsp;"?  The way I see it, it'd enlarge the non-breaking space, which would force the select box to fit it, which would give you an elarged box with no "ugly" large text inside.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Target h5 of a div 3 22
Border and image sizing 5 29
Create CSS Animation for Page Transitions 4 38
Why "Mobile First"? 5 18
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question