seaten Posted March 23, 2006 Share Posted March 23, 2006 I want the user to pick a font type, at the moment I have it in check boxes but I prefer to have it in a drop down list. But the key is to have each font option displayed in their own style. Any Ideas ? here is my current code: <b>Choose a Font Style for your Text:</b> <font face= arial>Arial</font> <input name="fontType" type="checkbox" id="sel_templateA" value="arial"> <font face="Bookman Old Style">Bookman Old Style </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Bookman Old Style"> <font face="Comic Sans MS">Comic Sans </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Comic Sans MS"> <font face="Courier">Courier </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Courier"> Link to comment https://forums.phpfreaks.com/topic/5630-font-type-in-drop-down-list/ Share on other sites More sharing options...
Gast Posted March 24, 2006 Share Posted March 24, 2006 [!--quoteo(post=357775:date=Mar 23 2006, 09:13 PM:name=seaten)--][div class=\'quotetop\']QUOTE(seaten @ Mar 23 2006, 09:13 PM) [snapback]357775[/snapback][/div][div class=\'quotemain\'][!--quotec--]I want the user to pick a font type, at the moment I have it in check boxes but I prefer to have it in a drop down list. But the key is to have each font option displayed in their own style. Any Ideas ? here is my current code: <b>Choose a Font Style for your Text:</b> <font face= arial>Arial</font> <input name="fontType" type="checkbox" id="sel_templateA" value="arial"> <font face="Bookman Old Style">Bookman Old Style </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Bookman Old Style"> <font face="Comic Sans MS">Comic Sans </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Comic Sans MS"> <font face="Courier">Courier </font> <input name="fontType" type="checkbox" id="sel_templateA" value="Courier">[/quote]The two things that I would recommend is not using the <font> tag. It is not widely used anymore and won't validate. Use <span style="font-family:Arial"> instead. Also, I wouldnt use a font like Bookman Old Style as not every user is going to have that font. Stick with Verdana, Trebuchet, Arial, Courier, Tahoma, etc.For your code have this:[code]<select name="fontType" id="selTemplateA"> <option value="Arial" style="font-family:Arial">Arial</option> <option value="Tahoma" style="font-family:Tahoma">Tahoma</option> <option value="Trebuchet MS" style="font-family:'Trebuchet MS'">Trebuchet MS</option></select>[/code]That should work! :) Link to comment https://forums.phpfreaks.com/topic/5630-font-type-in-drop-down-list/#findComment-20375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.