Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Question about background shorthand…

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #158065
    Rugg
    Participant

    Can background: url('image.png') no-repeat center center; be written without defining center twice? For example: background: url('image.png') no-repeat center;?

    And

    Can background-size: 40px 40px; be written using only one dimension? For example: background-size: 40px;

    Any help is appreciated. Thanks

    #158066
    Paulie_D
    Member

    background-position with center center I think can be reduced to just center,

    As I recall, if you only specify one keyword, the other value will be “center”

    Why not use Codepen and test it for yourself?

    #158161
    Rugg
    Participant

    Ok, thanks for the info!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.