#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    204
    Rep Power
    2

    Aligning div over a fullscreen background


    I have a fullscreen div that is formatted like this

    Code:
    background: url(images/bg.jpg) no-repeat center center fixed;
    Now i need to align another div over the Ipad part of the image, i've tried it with % but that didn't work. helpme' thanks!

    IMAGE HERE ( can't post IMG tags )
    http://notflip.be/thumb.jpg
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Location
    Troy, NY
    Posts
    46
    Rep Power
    68
    if your full screening the background depending on viewport size % is the only way you can do it. I would suggest picking a screen size (doesn't matter) and measure in pixels:


    1) your viewport window
    2) ipad viewport size
    3) and the margins on both the right and the left.

    determine your percentages based on these measurements and
    you should be good.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    Or you can target iPad by javascript and write separate CSS for the same. Latest trend is Media Query. Also use if you cn

IMN logo majestic logo threadwatch logo seochat tools logo