SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wahts influencing the loading icon position?

    Hi from wet & cold 6 degrees C wakefiled UK :-(

    On this page http://www.pauserefreshment.co.uk/go...arch_2010.html the loading icon when you click on a coffee machine is dead centre as it should be but why on this page: http://www.pauserefreshment.co.uk/index.html
    and click on the flavia coffee machine next too Flavia choc offer ends Wed 31st March you can see the loading icon is skewed off to the left.

    What I dont understand is that both pages pull on the same css and javascript so I dont know why the loading gif doesnt stay central.

    Any insights welcome :-)
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  2. #2
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok this line is influencing the position of the loading gif:
    #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }

    But I'm still no nearerer in figuring out how to keep it dead central in whatever page in loads in :-(

    Any insights welcome...
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  3. #3
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed this one my self - jusat adjusted the left margin where appropriate :-)
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,721
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Hi, sorry we weren't able to help.

    But to answer your question (as you figured it out) to center AP elements you must know the width and then all is easy (if you want vertical centering then you must know the height)
    Code:
    #element
    {
      position:absolute;
      top:50%;
      height:300px;
      width:300px;
      left:50%;
      margin-top:-150px;/*half the heigiht value*/
      margin-left:-150px;/*half the width*/
    }
    Off Topic:

    Are you sure you won't reconsider my offer of the iTunes? I wnat songs .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •