LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2008, 11:43 AM   #1
Furrage
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Rep: Reputation: 0
How do I use CSS to set height of a section using % like frames


I'm not sure if this is the right place to ask this, so if it is not please direct me where to go.

I want to create a simple webpage that has two sections. The top section must be 80% of the window's height regardless of the size of the window, or if the window is resized. Ordinarily I would use frames, but I understand the prefered technique now is to use CSS. How do I use CSS to do this?

So far I understand a style could be assigned with a height specified (eg. using a <div style="height: [something]"></div>). But percentages don't work for this parameter and I don't know how to get the pixel height of this parameter into the style when the window is sized.

Also with frames I could resize the frame by dragging the seperator between the top and bottom sections. How would I do this with CSS?
 
Old 02-09-2008, 01:15 PM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
have you even tried using %?
i would suggest you have a little look at w3schools.com
 
Old 02-12-2008, 10:21 AM   #3
Furrage
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Problem was with Netbeans IDE

I went back and checked (using % as I had before), but did it in Notepad instead of the Netbeans 6 IDE. It turns out that it works with Notepad, but not with Netbeans (I don't have a clue why). Thanks for the help.

As for dragging the border between the top half and the bottom half, any suggestions?
 
Old 02-12-2008, 08:14 PM   #4
JWPurple
Member
 
Registered: Feb 2008
Posts: 67

Rep: Reputation: 17
These kind of things are complicated by CSS browser compatibility problems. See www.alistapart.com for some good general info on formatting with CSS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing LTIB problem and cant set the user privilege section rohit83.ken Linux - Software 0 02-04-2008 11:16 PM
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 12:21 AM
Can CSS really replace FRAMES? rblampain Programming 1 01-03-2006 04:19 AM
Possible to create a frames effect in an HTML page without using frames? furfurdemon666 General 10 12-12-2004 06:52 AM
Vertical Height mkacz9 Linux - Newbie 3 10-17-2003 12:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration