www.webdeveloper.com
Results 1 to 8 of 8

Thread: position an object underneath

  1. #1
    Join Date
    Sep 2006
    Posts
    375

    position an object underneath

    In css I can get 2 objects to display on right hand side at top of page easy enough.
    I don't want to use absolute positioning for an object's position.


    I have to position an object relative to another object eg this object should go underneath this object, can i do this ?

    I use this , and is this the best way you can do it?

    position:relative; right=-240;top=0;
    Last edited by jagguy; 09-29-2006 at 06:57 AM.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    position:relative; right:-240px;top:0px;
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Sep 2006
    Posts
    375
    Ok I did do that but what i wanted to knoiw whether is using relative for positioning and float the bettter way to go , rather than use absolute. This is to posiiton things on a page, not to mention nested containers.

    Or is there another way?

  4. #4
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Here's a pretty good positioning tutorial. He even does both aspects of relative positioning.

    http://www.pmob.co.uk/faqcss/tutorial05/index.htm
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  5. #5
    Join Date
    Sep 2006
    Posts
    375
    To psoition everything on screen eg naviagtion on top and left of screen, content in the other parts with images everywhere etc.

    q)what about placing say 2-3 things in the 1 div section. I can have a horizontal section on top of screen with text. I want to place an image and text on far right (on same height). I can use relative positioning to place it but this can get messy.
    Last edited by jagguy; 09-30-2006 at 12:03 AM.

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Relative or absolute positioning is possible, or even placing the image as a background of the text element.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  7. #7
    Join Date
    Sep 2006
    Posts
    375
    thanks for the replies.

    q)I have had alook at many css designs eg 2/3 cols and bar at top stuff.
    After wanting to throw a book at my PC due to current logic in the matter, I partioned each part of the screen using absolute % and found that the thing actually is easy to understand and is as flexible as other design i saw. Sure if you change 1 part you need to adjust the others but that's what happened with other wc3 expert models i saw.
    Maintenance is important and the idea of fiddling about for ages with current setups was a little slow going.

    Am I wrong for making it work like this?

  8. #8
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    It's really kind of hard to say since we don't specifically know what "this" is. The current paradigm in web development is to use semantically correct HTML and do all presentation with CSS. If that's what you've got then you're doing what is currently considered "right."
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles