Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Thanked 0 Times in 0 Posts

    positioning div according to browser window

    hey guys
    im just building a portfolio website for my self and i wanted to create something that could work well across a number of devices and screen sizes.
    i recently came across this website http://tillwiedeck.com/ and noticed that the menu positions itself according to the size of the browser window. This works really well when viewing it on devices such as ipads and iphones. My question is that does anybody know if there is any way i could make an object always position itself at say 25% of the windows width and another object always position itself at 75% of the windows width. really hope i'm making myself clear.

    thanks heaps

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Thanked 667 Times in 666 Posts
    You simple set the width to 75% and 25% in the CSS. What is interesting in the site you gave, is the center HELLOME stays centered and the menu positions itself around it. Done by left and right absolute positioning. Nice effect.


    Tags for this Thread

    Posting Permissions

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