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
    Oct 2009
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with positioning

    HI
    I want to puted three <div>s side by side so I've used float property . two of them have float:right and the other one has float:left . my problem is with that two elements that have float:right properly . . they've sticked together . I want the central div be center of them and don't stick to right or left dev elements .

    i used margin-right but it didn't work

    TNX

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Posts
    178
    Thanks
    41
    Thanked 0 Times in 0 Posts
    Can you post a link to your website?

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,690
    Thanks
    22
    Thanked 1,830 Times in 1,814 Posts
    Hello hno2005,
    Here's an example with a float left and right and the center one positioned with margin:0 auto;

    Have a look at http://nopeople.com/CSS/3%20equal%20divs/index.html
    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


  •  

    Posting Permissions

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