sehana Posted December 25, 2008 Share Posted December 25, 2008 Can you put the text properties in one element?example: background-color:; background-image:; = background:;so can you do text:; ? Link to comment Share on other sites More sharing options...
Viper23 Posted December 25, 2008 Share Posted December 25, 2008 Are you wanting to know if you can do something like this?Example: background-color: #FFFFFF; background-image: url('image.jpg')And have it like this?Example: background: #FFFFFF url('image.jpg')If so then yes. If not can you provide more information please. Link to comment Share on other sites More sharing options...
rzea Posted December 25, 2008 Share Posted December 25, 2008 To answer your question: Yes, that's called CSS Shorthands: http://www.dustindiaz.com/css-shorthand/Now, background-color:; background-image: are not exactly text properties. Text properties would be: font-size:font-family:font-weight:text-align:text-decoration:etc... And, you are right, you can have all the background properties in one declaration: background: url(/images/image.jpg) left center repeat-x fixed #fff; Link to comment Share on other sites More sharing options...
jeffman Posted December 25, 2008 Share Posted December 25, 2008 Just to set the record straight (and because the board is quiet) I believe Sehana originally knew that background properties could be combined and was asking if font properties could be also. Link to comment Share on other sites More sharing options...
sehana Posted December 26, 2008 Author Share Posted December 26, 2008 Thank You all for answering , but Deirdre's Dad is correct. To clarify, I do know that I can use just "background:;" instead of the 'Long' way. (I didn't know what the 'shortcut' was called), now I know it's called "shorthand") so instead of typing out all the text properties... text-align:; text-decoration:; text-transform:; ...can I shorthand that and just type "text:;"? Link to comment Share on other sites More sharing options...
rzea Posted December 26, 2008 Share Posted December 26, 2008 Yes and No.No, because is not "text:;", is font:;. Try visiting the link I gave you...Yes, because it would be something like this: p { font:bold 1em/1.2em georgia,"times new roman",serif;} The order of the properties for font:; are:font-style:;font-variant:;font-weight:;font-size:;line-height:;font-family:; Link to comment Share on other sites More sharing options...
jimgilbert Posted December 26, 2008 Share Posted December 26, 2008 please delete this. i dont see where. Link to comment Share on other sites More sharing options...
sehana Posted December 26, 2008 Author Share Posted December 26, 2008 The order of the properties for font:; are:font-style:;font-variant:;font-weight:;font-size:;line-height:;font-family:; Hi yes I do know of the "font:;" shorthand also, but there are also text properties like text-align:; text-decoration:; text-transform:; ...so can those be shorthanded to just "text:;" ? Link to comment Share on other sites More sharing options...
rzea Posted December 26, 2008 Share Posted December 26, 2008 No."text:;" doesn't exist. Link to comment Share on other sites More sharing options...
sehana Posted December 27, 2008 Author Share Posted December 27, 2008 No."text:;" doesn't exist.Hi Thank You that was my question if I can do that.Didn't know if that was valid since CSS3 came out.Thank You Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.