div formatting, div formatting |
div formatting, div formatting |
J4ason |
Dec 16 2014, 09:49 PM
Post
#1
|
Group: Members Posts: 8 Joined: 13-December 14 Member No.: 21,936 |
ok what i want to do is this:
<div> Header </div> - width 100% <div id=container> <div> nav </div> <div> main content </div> - width and height 100% (100% but within the head&footer) </div> <div> footer </div> - width 100% i want the format of the page to look the same no matter what size the window is which is isn't when using pixels sizing. what do i need to type in as the heigh and width to do this? at the minute i have the div id=container with a min width of 100% put i am struggling to get the height right - i hope i have explained this well and someone can help me. i am just starting to learn. |
J4ason |
Dec 16 2014, 10:48 PM
Post
#2
|
Group: Members Posts: 8 Joined: 13-December 14 Member No.: 21,936 |
found my answer - #div { height: 100vh; }
|
pandy |
Dec 16 2014, 11:53 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Support seems rather good in newer browsers. It will fail in older ones though.
http://caniuse.com/#feat=viewport-units |
Lo-Fi Version | Time is now: 25th April 2024 - 07:20 AM |