View Full Version : positioning div according to browser window

01-24-2012, 04:35 AM
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 :)

01-24-2012, 04:42 PM
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.