Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2009
    Posts
    167
    Thanks
    15
    Thanked 1 Time in 1 Post

    calling all veteran html/css coders: absoloute positioning opinions?

    hello,

    i was hoping Gnome On the Run or some of the other experienced coders around here could chime in on this one:

    i used absolute positioning to place a few elements in the upper-left hand corner of the screen, some of which have javascript behaviors in them. i used ems as the locating specifications.

    it's working really well, i tested it in firefox, ie, opera, and safari.

    but i've heard vague warnings to "avoid absolute positioning", due to unpredictable user experiences.

    what's the experienced coders' take on absolute positioning? it seems like "a few things in the upper-left hand corner" should be ok (for example, to lock a site logo in stone into the upper left hand corner). it's working so well that i'm almost concerned.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello code beginner,
    There are certainly times that ap is needed and there's no problem with using it when it makes sense to do it that way. A lot of times the problems from using it are just because the author doesn't understand what the ap is relative to and that is usually an easy fix.
    There is nothing really wrong with ap, it's not like using tables for layout, slicing up images or using spacer divs.

    A good rule of thumb is, if it works without it... don't use it.
    It's always better to let the document flow naturally. If that doesn't work, ap to your hearts content!
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    code beginner (05-14-2010)

  • #3
    Regular Coder
    Join Date
    Sep 2009
    Posts
    167
    Thanks
    15
    Thanked 1 Time in 1 Post
    thanks...Alaska!

    that's good to know. it's kind of in a tricky spot on the page and the other "go-to" methods weren't producing the right results. then i tried absolute positioning and it worked immediately. it also gave me really good control by using the ems.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •