This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes DIV,TEXTBOX,FONT RESIZE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DIV,TEXTBOX,FONT RESIZE" Watch "DIV,TEXTBOX,FONT RESIZE" New topic
Author

DIV,TEXTBOX,FONT RESIZE

carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

Hi inmy application the display pages are designed using html components div,texboxes etc i wrote a css that defines the sizes and layout of this div and textboxes, when my browser window is at maximum height and width the layout is proper but when i resize the browser window and minimize the browser size the div components and the text boxes get mix with each other and the lay out is not proper , i want the text boxes and div to lay themselves according to the window size how can i accomplish this?
any suggesstions please
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

You should be using absolute positioning and size attributes in your CSS? Have you tried changing them to relative values, as in percentages?

Cheers,
Raj.
[ October 06, 2008: Message edited by: Raj Kamal ]
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

actually i have designed a long CSS some of them are in % and some in pixel values , as there are many div,texboxes,labels,buttons some are relative positioned and some are absolute...
suggest me should i change all of them to absolute positioning with percentage values?
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

The difference between the two is that using absolute positioning/sizing you can consider the position/size as fixed on the page. It wont change on window resize. If you use relative positioning/sizing then it becomes relative to the size of the window. So when the window is resized they change.

If some elements are relative then can you see them readjust on window resize? Check out for the absolute items also on resize. You should be able to make out the difference.

Cheers,
Raj.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: DIV,TEXTBOX,FONT RESIZE
 
Similar Threads
Liquid Layout (resizing the columns of table)
help with Layout consideration
TableLayout Issue
Making Typing "Game", any tips or pointers before I start?
JFrame resize problem