aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes css positioning Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "css positioning" Watch "css positioning" New topic
Author

css positioning

Vijayalakshmi Srinivasan
Greenhorn

Joined: Mar 29, 2002
Posts: 18
Hi all,
I just started learning CSS and was very happy to find that I could position my images and text using <div> tags instead of tables.
Now I'd appreciate some advice on the following:
1. I've specified % top and left positions so that my page looked presentable when I changed from resolution to resolution or resized my browser.For ex.
#logo
{
position:absolute;
left:2%;
top:2%;
}
#navleft
{
position:absolute;
left:2%;
top:30%;
}
Is this done normally? Will it help at all?I just didn't want to design my page for any fixed resolution and therefore didn't use pixel sizes.
2. For my images though, I haven't set width & height at all(neither px nor %). So when I resize my browser/shrink it by dragging the resize arrow, my images and text shrink and overlap. I was wondering if it is possible to eliminate this by setting % heights and widths for images also?
3. How can I set % font sizes for say, my navigational links/headings etc.
I know I have other browsers and OS's to take into acct, but I just wanted to start somewhere!
Thanks a lot
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
yes you can use persentages for everything, you can not use a precentage for fonts, you could combine javascript with it to change the size of the font depending on the resolution.screen size, or you can just use images instead of text and shrink them with a precentage.
Eric
 
 
subject: css positioning
 
Threads others viewed
Layout Managers
Position of DIV
Can any body provide some link for writing MYPage
Strange Script Bug
CSS and image positioning
IntelliJ Java IDE