WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] HELP - bad formatting in XHTML (9 posts)

  1. mschumacker
    Member
    Posted 4 years ago #

    I took a working theme and changed it for my purposes. This works great as a stand alone html doc, and even works great when is serves out HTML for Internet Explorer, but no other browsers. Once I change it to XHTML, it breaks. It passes validation.

    Any help would greatly be appreciated.

    http://wripymca.org/

    Thanks.
    Matt

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    two small steps to begin with:

    this following area is too wide, so the content is forced to below the sidebar - change the width (in style.css):

    #mainContentArea
    {
        float:left;
        margin: 0px;
        padding: 50px 20px 0px 35px;
        width: 640px; /*changed from 700px;*/
        font-size: 90%;background:green;
    }

    to get the background to show all the way down (in firefox), edit footer.php, at the end - change this:

    </div>
    		</div>
    </body>
    </html>

    to this:

    </div>
    		</div>
    <div style="display:block;clear:both;"></div>
    </body>
    </html>

    hopefully, this helps and does not disturb the IE.

  3. mschumacker
    Member
    Posted 4 years ago #

    I still can't get the background image to repeat...I've never seen this. This is usually pretty easy.

    Any other ideas?

    I'm changing the body's background color so that I can at least read the site.

  4. mschumacker
    Member
    Posted 4 years ago #

    Here's a screen shot of how it's suppose to look. I actually do this for a living and have never seen this issue. It's like my divs are all off. The header isn't even right.

    http://wripymca.org/wp-content/themes/wrip/sample.jpg

  5. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    small typo:

    <div stlye=display:block;clear:both;"></div>

    should read:
    <div style="display:block;clear:both;"></div>

    and a mistake from me:
    position of the extra line was wrong:
    this is the correction:

    </div>
    
    <div style="display:block;clear:both;"></div>
    </div>
    </body>
    </html>

    hope you can spot the difference and have luck in editing the footer.php.

  6. mschumacker
    Member
    Posted 4 years ago #

    Ok...thanks for the help so far.

    I added some display:block and float: left...and now the formatting is correct.

    One problem, my background-image is missing.

    Any idea why this would be missing?

  7. mschumacker
    Member
    Posted 4 years ago #

    Ok...got the image back as long as I use a float: left on the myBody section. This means it doesn't center that area.

    If I take off the float:left, I center the content, but lose the image.

    Ideas?

  8. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    nearly looks ok in firefox.
    (the float helps, but makes the site off-center)

    the spelling mistakes are still in this line:
    here again the correct one:

    <div style="display:block; clear:both;"></div>

    (the word style is misspelled, and a double quote missing.)

    please take the time to correct this in footer.php.

  9. mschumacker
    Member
    Posted 4 years ago #

    THANKS. I corrected the typo and was able to take out the 'float: left' and get my site centered.

    Thanks a bunch for all your help.

Topic Closed

This topic has been closed to new replies.

About this Topic