Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > HTML / DHTML

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-06-2012, 04:26 AM   #1
davikerkrish
Registered User
 
Join Date: Jul 2012
Posts: 111
CSS Font Shorthand

When using shorthand on the font property you need to specify each property in the following order

body { font: font-style font-variant font-weight font-size line-height font-family; }

You don’t need to include every property, but know that for any you don’t include that property will be reset to it’s default.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
davikerkrish is offline   Reply With Quote

Old 10-16-2012, 10:45 PM   #2
eswari
Registered User
 
Join Date: Aug 2012
Posts: 33
When styling fonts with CSS you may be doing this:

font-weight: bold;
font-style: italic;
font-variant: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif
There's no need though as you can use this CSS shorthand property:

font: bold italic small-caps 1em/1.5em verdana,sans-serif
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
eswari is offline   Reply With Quote
Old 10-22-2012, 05:23 AM   #3
davikerkrish
Registered User
 
Join Date: Jul 2012
Posts: 111
You can separate by commas like "bold","italic"
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
davikerkrish is offline   Reply With Quote
Old 12-04-2012, 11:50 PM   #4
abhirampathak3
Registered User
 
Join Date: Nov 2012
Location: India
Posts: 103
CSS Font Shorthand and styling fonts with CSS you may be doing with
font: 1em/1.5em bold italic serif

instead of

font-size: 1em;
line-height: 1.5em;
font-weight: bold;
font-style: italic;
font-family: serif

Please try for it.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Shopping Cart - PrestaShop, Zencart; CMS - WordPress, Joomla; Custom Development


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- SEO, Pay Per Click (PPC), SEM, Link Popularity Building, SEO Copywriting, SMO, SMM
abhirampathak3 is offline   Reply With Quote
Old 12-05-2012, 12:21 AM   #5
jaysh4922
Registered User
 
Join Date: Dec 2012
Posts: 657
When you use the shorthand property, i think you should remember that it requires both the size and the family...
jaysh4922 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compromise your Font Use. sajidkhan Traffic Corner 0 11-15-2011 01:18 AM


All times are GMT -7. The time now is 11:21 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.