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 10 of 10
  1. #1
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts

    usual way to align divs?

    moving away from tables... to get divs when you want them do you typically just use a bunch of <br />'s and &nbsp;'s and/or other empty div's...or maybe by just applying {position: absolute; top: Xpx; right: Ypx; }? link to a page explaining the best strategy?
    Last edited by cyborg360; 12-31-2009 at 02:46 AM.

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    No, that's not how to do it. A simple source view on well-designed sites would tell you that much. There are some free template sites around. Download some and see how they do it.

    One is http://www.oswd.org/, but it's being a bit slow for me at the moment.
    Are you a Help Vampire?

  • #3
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts

    anyone have another link

    haven't been able to load that aforementioned site...been trying over 15 minutes.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Quote Originally Posted by cyborg360 View Post
    moving away from tables... to get divs when you want them do you typically just use a bunch of <br />'s and &nbsp;'s and/or other empty div's...or maybe by just applying {position: absolute; top: Xpx; right: Ypx; }? link to a page explaining the best strategy?
    What type of layout you have in mind?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    What type of layout you have in mind?
    just want to have the freedom to place divs anywhere. For example, I

    might
    ....like
    ......to
    .......place
    .........them
    ............like
    ..............this.

    (omit periods)

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Quote Originally Posted by cyborg360 View Post
    just want to have the freedom to place divs anywhere. For example, I

    might
    ....like
    ......to
    .......place
    .........them
    ............like
    ..............this.

    (omit periods)
    Umm.. then absolute position will be the best choice. But, you need to take care of overlapping of elements/texts when the user use the zoom option from their browser.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cyborg360 View Post
    just want to have the freedom to place divs anywhere. For example, I

    might
    ....like
    ......to
    .......place
    .........them
    ............like
    ..............this.

    (omit periods)
    or a
    margin-left: 0px
    ....margin-left: 20px
    etc

    Which leaves the divs free to move if content is larger or zoomed

  • #8
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    thanks for the replies.

    I'm still trying to resolve a simple issue.

    I see now how to cascade divs with the margin-left: ??px like I was trying to do earlier.

    But, can you place a div directly to the right of another div without floating left the first div or placing both divs within one master div?

  • #9
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    But, can you place a div directly to the right of another div without floating left the first div or placing both divs within one master div?
    A float or absolute position will b e required to effectively place two divs/"block level elements" side by side.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #10
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    A float or absolute position will b e required to effectively place two divs/"block level elements" side by side.

    thanks for clearing that up.


  •  

    Posting Permissions

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