Forums

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

Home Forums CSS Background Position: center center;

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38773
    samnizamani
    Member

    I know what the first center declaration is for, I think it is to tell css that just the central part of an image should appear (Nothing else that belongs to that same image, ryt?)… What 2nd center is for?

    And what what does this mean?
    ul#nav li a{
    height:65px;
    text-indent: -9999px;
    float:left;
    }

    I actualy understand what this actualy means, But kinda doesn’t make sense, here we r telling css to move text away from the screen, ryt? If links themselves are not on the screen then how would css and html know at part of the image we r clicking, and what that click should do? This is confusing… Plz help me understand this?

    #105385
    TheDoc
    Member

    It reads like this:
    background-position: X-position Y-position;
    There are two separate axes (the x-axis and the y-axis) that need to be told what to do.

    As for the other bit, the text-indent is only moving the text off of the screen, but not the link itself.

    #105387
    Meta_Ing
    Participant

    background-position:center center ensures that the background image will be both horizontally and vertically centered in its container. I believe most browsers consider one center to be equivalent, so using two is likely either a matter of personal preference, or just to be safe with all browsers.

    #105606
    samnizamani
    Member

    Wonldn’t moving text off of the screen coz the links to disappear? Why? Link are text ryt..? Then why not?

    #105607
    samnizamani
    Member

    thx for your answers… now i understand what postion means…

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