Richard Korts
asked on
Apply <select> css to only specific <select>'s
I have a need to have HTML select options display on more than one line so the width is not super wide on smaller devices.
I have a great solution, a sample of it's usage is illustrated in the attached html.
I need a slight variation on this, in that the "real" program has several selects, I only want the one that limits the width to apply to ONE of the <select> elements in a specific html page.
I'm guessing I could somehow define the whole mechanism that wraps as a class & apply that class ONLY to the <select> element I need to use it on.
I'm not sure how to do that. Can someone advise?
Thank you
test_mline_select.htm
I have a great solution, a sample of it's usage is illustrated in the attached html.
I need a slight variation on this, in that the "real" program has several selects, I only want the one that limits the width to apply to ONE of the <select> elements in a specific html page.
I'm guessing I could somehow define the whole mechanism that wraps as a class & apply that class ONLY to the <select> element I need to use it on.
I'm not sure how to do that. Can someone advise?
Thank you
test_mline_select.htm
Or as you say you could use a class, which is more appropriate than an id if there can be more than one element to apply the style to.
ASKER
Terry,
There is more than one element, that is the whole purpose of the question.
I am not good enough at CSS & classes to know how to encapsulate the features needed for this style into a class
& then apply it to the applicable element.
Thank you,
Richard
There is more than one element, that is the whole purpose of the question.
I am not good enough at CSS & classes to know how to encapsulate the features needed for this style into a class
& then apply it to the applicable element.
Thank you,
Richard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Terry,
Perfect, thanks!
Perfect, thanks!
Open in new window