SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Center/wrapper issue in Firefox

    As a total newbie, I've exported my CSS from photoshop which created a bunch of absolute divs for each graphic slice. I can live with this for now (still testing) but I can't figure out how to get the content centered. It centers great in IE but not FF. I've tried several fixes from sites but can't figure out where the fix is.

    Appreciate ANY help!
    Lisa

    CSS:

    body {
    text-align: center; /* Hack to center the wrapper in IE5.x pc */
    min-width: 778px; /* Prevents the body becoming narrower than our wrapper div */
    background: url(images/background.gif) repeat;
    margin: 0;
    padding: 0;
    border: 0;
    }

    #wrapper {
    position:relative;
    margin:0 auto;
    text-align:left;
    width: 778px;
    }

    #content {
    left:0px;
    top:0px;
    width:761px;
    height:749px;
    text-align: left;
    position: relative;
    border-color: red;
    }


    #homepage {
    position:absolute;
    left:0px;
    top:0px;
    width:761px;
    height:21px;
    }

    #homepage002 {
    position:absolute;
    left:0px;
    top:21px;
    width:32px;
    height:348px;
    }
    ...


    HTML:
    <html>
    <head>
    <title>NorthPointe Community Church</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="default.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="content">
    <div id="homepage">
    <img src="imgs/homepage.jpg" width="761" height="21" alt="" /> </div>
    <div id="homepage002">
    <img src="imgs/homepage-02.jpg" width="32" height="348" alt="" /> </div>
    <div id="homepage02">
    <img src="imgs/homepage02.jpg" width="275" height="133" alt="" /> </div>
    ...


  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The main problem is the use of absolute positioning and trying to center it all. Your code is also, apparently, using Xhtml end tags but using html and in quirks mode. I know you may not know what all that means but you are showing us why you should never use Photoshop to create web pages. It's a mess.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,288
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Read the faq on centring as this explains what you need to do. If you still can't work it out then post back with your full code .

    It looks as though your page elements should be inside that #wrapper div you have in your css but you don't seem to have it in the html.

  4. #4
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks

    Um...yeah, that worked. I feel dumb. Anyway, thanks for the help instead of ridiculing how bad it was.


Bookmarks

Posting Permissions

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