RRRSystems Posted October 10, 2010 Share Posted October 10, 2010 Hello,Is it possible to use a predefined Class within an ID.My.html<DIV ID=”Banner”> This is the text I would like as Times New Roman.</DIV>My.css.TimesNewRoman{ Font-Family: "Times New Roman", Times, Serif;}#Banner{ .TimesNewRoman;}I know that I can add the CLASS="TimesNewRoman" to the DIV in My.html, butI would like to do something like this.Thanks,Raney Link to comment Share on other sites More sharing options...
jeffman Posted October 10, 2010 Share Posted October 10, 2010 There is no syntax equivalent to what you are describing. Link to comment Share on other sites More sharing options...
Drycodez Posted October 10, 2010 Share Posted October 10, 2010 There is no such code in css (cascading style sheet).but you can copy the codes in the class selector and paste it in the id selector.e.g#Banner{font-family:"times new roman", times, serif;}. that will do the work. Link to comment Share on other sites More sharing options...
thescientist Posted October 11, 2010 Share Posted October 11, 2010 or you could just add the times new roman class to whatever element you are giving the #banner ID to Link to comment Share on other sites More sharing options...
Ingolme Posted October 11, 2010 Share Posted October 11, 2010 If you do want to apply the same style to several selectors, you can do this:#banner, .someClass, .article p { font-family: "Times New Roman", serif;} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.