The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Height of element defined by percentage of width, implementing the golden ratio in liquid layouts
Joel Gafford
post Oct 11 2011, 08:48 PM
Post #1





Group: Members
Posts: 1
Joined: 11-October 11
Member No.: 15,606



Layout Design

My plan is to initially divide the screen up horizontally using the golden ratio which is approximately 1.618 to 1.
Then I want to define the height and/or width of other elements (such as margins, collumns, images etc.) based on percentages of the width of the screen.
(The purpose of doing this is to maintain a naturally aesthetic feel throughout the entire document by having all margins, collumns, images, etc. proportional to the original golden rectangle whose width is the width of the screen.)

So far I have only seen div tags that divide based on either fixed pixel value, or width of an element defined by percentage of screen width. (or height of an element defined by percentage of screen height.)

My question is: Is there a way to define the height of an element based on percentage of screen width? (or visa versa)

Thank you!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 12 2011, 07:51 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You'd need JavaScript for that.

Footnote: If you use percent for margins it's always a percentage of the containing block's width, even top and bottom.
http://www.w3.org/TR/CSS21/visudet.html#propdef-width
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 03:47 PM