Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2012, 03:35 AM   PM User | #1
jlousick
New to the CF scene

 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jlousick is an unknown quantity at this point
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
jlousick is offline   Reply With Quote
Old 01-24-2012, 03:42 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,365
Thanks: 18
Thanked 348 Times in 347 Posts
sunfighter is on a distinguished road
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.
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Tags
css, div, html, positioning, web

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:28 PM.


Advertisement
Log in to turn off these ads.