rantsh Posted January 31, 2007 Share Posted January 31, 2007 I'm using the optgroup tag and I don't have a clue on how to set the inner padding of the options[code]<select><optgroup label='something'><option>foo</option></optgroup></select>[/code]Displays something like[code]something foo[/code]and I't like to get something more like[code]something foo[/code](notice the padding on the 'foo' line)Any help will be very much appreciated,THX Quote Link to comment Share on other sites More sharing options...
fenway Posted January 31, 2007 Share Posted January 31, 2007 Well, that's the browser's decision... I'm not sure how much you can "style" these with standard controls. Quote Link to comment Share on other sites More sharing options...
rantsh Posted February 2, 2007 Author Share Posted February 2, 2007 so, there's nothing I can do about this? Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 2, 2007 Share Posted February 2, 2007 is the label css? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 2, 2007 Share Posted February 2, 2007 You'd have to check the docs to see what's allowed, or just try and play with style tags. Quote Link to comment Share on other sites More sharing options...
janroald Posted February 2, 2007 Share Posted February 2, 2007 Just add inline padding like this : <select multiple size="5"> <optgroup label="something"> <option style="padding-left:3px;">foo</option> </optgroup> </select> or you can do something like this <select multiple size="5"> <optgroup label="something" class="custom_padding"> <option>foo</option> </optgroup> </select> and in your css write : optgroup.custom_padding option { padding-left:3px; } That will affect all your <option>'s Quote Link to comment Share on other sites More sharing options...
rantsh Posted February 3, 2007 Author Share Posted February 3, 2007 Thank you guys that was very helpful, anyone knows how I can mark this topic as solved? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 5, 2007 Share Posted February 5, 2007 Done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.