• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

css positioning  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!