question about "position: relative;" "position: absolute;"

Discussion in 'CSS' started by i_am_dhaval, Jun 21, 2007.

  1. #1
    if i use all time "position: absolute;" in all block or id or what enver...

    so is it ok????? bcoz it is good for moving in dreamweaver....

    give me suggestion....
     
    i_am_dhaval, Jun 21, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    That is likely the poorest choice you could make. But, using DW to lay out your page is a pretty poor choice itself. From the gist of your many1 questions, you don't know even the basics of css. Please improve your knowledge base by working through several css (and html) tutorials. Those at htmldog are especially good. Google is your friend.

    cheers,

    gary
     
    kk5st, Jun 21, 2007 IP
  3. briansol

    briansol Well-Known Member

    Messages:
    221
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #3
    learn floats :)

    absolute positioning for MAJOR layout blocks is a nightmare waiting to happen
     
    briansol, Jun 21, 2007 IP
  4. i_am_dhaval

    i_am_dhaval Well-Known Member

    Messages:
    1,364
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #4
    if i use "absolute positioning" then i facing any problame....bcoz layout is looking fine....
     
    i_am_dhaval, Jun 21, 2007 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    If you aren't going to pay heed to advice you have solicited, why bother asking?

    gary
     
    kk5st, Jun 21, 2007 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    The big rule about absolute positioning is that the further down the page you use it, the more difficult and unweildly it is. It is a very useful tool used in moderation when doing things like layering effects with presentational elements.

    But NEVER use it on content - that's just asking to /FAIL/

    Most of the time you are better off using floats, or negative margins.
     
    deathshadow, Jun 23, 2007 IP
  7. ektz

    ektz Active Member

    Messages:
    599
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    80
    #7
    why one should avoid absolute positioning of layers is because the first and formost reason that what you see in the Dreamweaver, will not be the same for browsers most of the times, and with different screen resolution, your page will position the elements differently.

    as everyone said above, you're better of using margins.
     
    ektz, Jun 23, 2007 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    Hence the problem with all WYSIWYGS, not only do you have the issue of different browsers, but screens come in widely varying sizes, resolutions and system font metrics... Because of that what you see is most likely NOT what the user gets. It is also the folly of 'pixel perfect' layouts with no provision for dynamic growth.

    ... and at the end of the day your site should be at the whim of the users preferences, not your own. It's why target="_blank" is considered impolite, px sized fonts should be restricted to px width containers using dynamic fonts everywhere else, and why most WYSIWYG's are a total /FAIL/ at web design, even the highly touted (and IMHO vastly overrated) Dreamweaver.
     
    deathshadow, Jun 24, 2007 IP