Go Back   CodingForums.com > :: Client side development > General web building > Building for mobile devices

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 03-30-2010, 02:33 PM   PM User | #1
sethwb
Regular Coder

 
Join Date: Aug 2008
Posts: 105
Thanks: 9
Thanked 0 Times in 0 Posts
sethwb is an unknown quantity at this point
mobile design beginner needs help

Hi Everyone,

I have a fluid layout that expands the full width of your mobile device.

There are 3 buttons at the bottom that I want to center the text in depending on the size of the screen.

I want to resize the width of each link according to the ratio I've started with, could anyone please tell me the equation used to determine that? I'd appreciate it, here's the numbers:

Total width of base design: 240px

Div1 (far left): 62 pixels wide
Div2 (middle): 110 pixels wide
Div3 (far right): 68 pixels wide

So - how can I figure out the correct width for each if I am adapting the design to 320, 480 and 800 pixels?

Teach me how to fish instead of giving it to me and I WILL reciprocate

Thanks,
seth
sethwb is offline   Reply With Quote
Old 03-30-2010, 02:54 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Use relative units like percent.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 03-30-2010, 04:36 PM   PM User | #3
sethwb
Regular Coder

 
Join Date: Aug 2008
Posts: 105
Thanks: 9
Thanked 0 Times in 0 Posts
sethwb is an unknown quantity at this point
I remembered after waking up a bit -

(62/240 * 320/1) / 240

have a nice day
sethwb is offline   Reply With Quote
Old 03-30-2010, 04:39 PM   PM User | #4
sethwb
Regular Coder

 
Join Date: Aug 2008
Posts: 105
Thanks: 9
Thanked 0 Times in 0 Posts
sethwb is an unknown quantity at this point
Haha you is the man.. why didn't I think of that before?

thx Stephan
sethwb is offline   Reply With Quote
Reply

Bookmarks

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 02:44 PM.


Advertisement
Log in to turn off these ads.