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 6 of 6
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,441
    Thanks
    15
    Thanked 0 Times in 0 Posts

    center on ie and firefox

    i've had this issue before and went back to old threads but still having trouble.
    iv'e tried many things and none seem to work on both ie and firefox.

    please see http://www.awebfo ryou.com/j/

    how can i center it to the middle in both ie and firefox

    i need the div's under homemain to be able to be displayed relative to the position of homemain.

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Site is not avaible.

    However, you just need to set a width on the div and then apply following:

    margin-left:auto;
    margin-right:auto;


    (or margin:0 auto; )?

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,441
    Thanks
    15
    Thanked 0 Times in 0 Posts
    i did that - please remove space from site link

    div#homemain {
    width: 727px;
    height:781px;
    margin-left:auto;
    margin-right:auto;
    background-color:#222d2d;
    text-align:left;
    padding: 0px;
    background-image: url(images/jwebhome.jpg);
    display:block;
    position: absolute;
    background-repeat: no-repeat;



    }

  • #4
    Regular Coder
    Join Date
    Jun 2004
    Posts
    495
    Thanks
    0
    Thanked 82 Times in 80 Posts
    Change position: absolute; to position: relative;

    Having all the layout divs position: absolute is no a good strategy.

  • #5
    Senior Coder
    Join Date
    May 2004
    Posts
    1,441
    Thanks
    15
    Thanked 0 Times in 0 Posts
    but then how do i put for example the search box in the exact spot that I want it on the top?

    if it's relative it won't go to the right place.

  • #6
    Regular Coder
    Join Date
    Jun 2004
    Posts
    495
    Thanks
    0
    Thanked 82 Times in 80 Posts
    float:right; or position relative; right:0;


  •  

    Posting Permissions

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