On Tue, Feb 23, 2010 at 9:01 AM, Tom Livingston <tom...@gmail.com> wrote:
> List,
>
> What is the reasons for using:
>
> background: #fff;
>
>
>
> instead of:
>
> background-color: #fff;
>
>
>
> I've seen this lately, and wonder why the preference for the first
> one. I've only used 'background' as shorthand for something like:
>
> background: #fff url(images/image.png) left top no-repeat;
>
> Which is better or more correct?

Neither is "more correct" and "better" depends on the situation.
"background" is just one of the many shorthand properties you can use
like margin, padding or border.  It can save you a lot of text by not
having to specify each specific element of background and instead
groups them up in one nice rule.  It really depends on  your coding
style and if you're looking to minimalize the size of your CSS.
Really, though, both are fine to use.

-- 
------------------------------------------------------------------------------------
Jason Arnold
http://www.jasonarnold.net
------------------------------------------------------------------------------------
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to