Tom Livingston wrote:
> On Tue, Feb 23, 2010 at 10:18 AM, Bill Braun <bbr...@hlthsys.com> wrote:
>   
>> Tom Livingston 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?
>>>
>>>       
>> Background is for HTML markup and is reserved for images,
>> background-color is for CSS.
>>
>>     
>
>
> So in an article I was reading, this code example was shown when
> discussing a stylesheet:
>
> body {
>      color:#000;
>      background:#fff;
> }
>
> By your assessment, this is wrong. I find it hard to believe the
> author would not use correct syntax as he is fairly well known in the
> front-end/CSS world. Alas, he is human, but you know what I mean...
>   

No, it is OK. In CSS you can use "background" and list a number of 
property values consecutively. See: 
http://www.w3schools.com/css/pr_background.asp

Or you can break out background into separate properties:

background-color,
background-image,
background-position,
background-repeat


Bill B

______________________________________________________________________
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