WordPress.org

Ready to get started?Download WordPress

Forums

help with centering theme in firefox (15 posts)

  1. shmish
    Member
    Posted 8 years ago #

    Hello,

    My theme was not centering in firefox, but it was in ie. I searched for quite a while, and found a solution here where someone suggested to add <div align=center> in the header and close it in the footer. This works as can be seen at http://www.dryfly.ca. Without this code, the page gets left aligned in firefox (but is okay in ie).

    However, this code does not validate. Does anyone have any other ideas or suggestions on centering this theme?

    thanks

  2. moshu
    Member
    Posted 8 years ago #

    For validation: just give it a name, e.g. container, wrap whatever, and define it in the stylesheet:
    #container {
    text-align: center;
    }

    FYI: you have a huge horizontal scrollbar in FF.

  3. shmish
    Member
    Posted 8 years ago #

    Thanks moshu,
    but this doesn't work for my theme. I defined the container in the stylesheet and replaced
    <div align="center">
    with
    <div id="container">
    The theme become left-aligned again...

    Any idea on why there is the huge scrollbar?
    All I did was modify some of the styles in minimaplus theme. When I tried to use an element in the stylesheet to define the white background, this is where these problems began. Minimaplus uses a graphic for the main background.

    I can always make a new graphic and go back to the original layout of minimaplus. But little Issues like the ones I'm describing here drive me crazy. I feel the need to solve the problem!

  4. skulled
    Member
    Posted 8 years ago #

    Change this in your stylesheet:


    #container {
    text-align: "center";
    }

    Becomes:


    #container {
    margin: 0 auto;
    text-align: "center";
    }

    that should work ..

  5. skulled
    Member
    Posted 8 years ago #

    and by the way, I am trying a fix for your menu, will let you know once I have it .. :)

  6. shmish
    Member
    Posted 8 years ago #

    skulled, thanks for your help with this.
    I changed the stylesheet, but still no luck.

  7. moshu
    Member
    Posted 8 years ago #

    text-align: "center";
    Why the quotes? You don't need that in a stylesheet...
    Correctly is:
    text-align: center;

  8. shmish
    Member
    Posted 8 years ago #

    Point taken. I don't have quotes in the stylesheet.

  9. skulled
    Member
    Posted 8 years ago #

    Try making the following changes:


    body {
    background: #36393d;
    padding:0px 20px;
    font:x-small Georgia,Serif;
    color:#666;
    font-size/* */:/**/small;
    font-size: /**/small;
    }

    becomes:


    body {
    margin: 0px;
    padding: 0px;
    background: #36393d;
    font:x-small Georgia,Serif;
    color:#666;
    font-size/* */:/**/small;
    font-size: /**/small;
    }

    Add this:


    body * {
    margin: 0;
    padding: 0;
    }

    And then the way you have your #rap leave that alone. I suspect that should work. Otherwise I am going to have to look at the source code itself, and not the rendered source from the browser.

  10. shmish
    Member
    Posted 8 years ago #

    I think I had tried that earlier, to no avail.
    Here is my template, in case you have the time and inclination to look at it a bit closer:
    http://www.dryfly.ca/public/minimasluga.zip

    thanks

  11. Joshua Sigar
    Member
    Posted 8 years ago #

    Just add the following in #page
    margin: 0 auto;

  12. shmish
    Member
    Posted 8 years ago #

    nothing happening with modifying #page, didn't fix the problem.

    s

  13. shmish
    Member
    Posted 8 years ago #

    well, I got things kind of centered by getting rid of the #rap and #page styles, and just repeated my background image in the <body>, letting this image provide the white background on the page. However, I still have the huge-ass scrollbar.

  14. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I see no scrollbar in FF or IE on XP so I assume it's fixed ?
    http://www.dryfly.ca/blog/

  15. Usayd
    Member
    Posted 8 years ago #

    looks fine from here

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags