• I’ve had this site up for many months now and just noticed this bug. When I click on a post title link to view the post as a single page, my layout breaks – background boxes lose their 100% height and in Firefox the comment area is totally inaccessible. I’m looking at this on Mac Firefox and Safari – am not able to check it on Windows at the moment. I can post screenshots if you’re not seeing the wonkiness I’m describing.

    Any suggestions on what to fix? Is it something in the single.php file? This is a free WordPress template that I’ve barely modified – just changed a few colors and the header image in the CSS file.

    Link to guilty page (compare it with homepage to see background boxes behaving as they should)

    http://woodfordgallery.com/2008/03/building-renovation-continues-2/#comments

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey gnubler,

    I’d recommend fixing the validation errors on your single.php page.

    Also, your comments don’t seem to show because of a poorly-closed comment tag.

    Look for this:

    <!--<div class="boxedup">
    <!-- You can start editing here. -->

    The top comment isn’t closed there, so browsers are taking the closing bit from further down the page. In Firefox 3, the closing comes here:

    <!--<small><strong>XHTML:</strong>

    On another note, your links using target=”_blank” aren’t working because your pages are set with a DOCTYPE of Strict. If you change your DOCTYPE to transitional, they’ll validate, otherwise you need to use JavaScript to create links that open in new windows.

    Hope this helps.

    Thread Starter 748039

    sewmyheadon, you are a true lord and master of WordPress poetry. Issues solved. I deleted all the commenting around the boxedup div and everything is good. Why it was commented, I know not.

    I’ll look into the link targets you mentioned – the _blank targets are opening in new tabs in my Firefox and new windows in IE…are they not opening for you at all? Odd.

    Thanks again. Solved.

    gnubler,

    Thanks for the niceties. 🙂

    No, the links open just as intended in new windows or tabs, but using the target="_blank" with your theme causes you to have validation errors because target="_blank" isn’t valid markup for xhtml documents with a DOCTYPE of strict.

    So, my guess is that you have a header.php file that begins with lines like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    You could change the DOCTYPE for your site pages to xhtml Transitional by changing the above two lines to read:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    This will allow you to use target="_blank" without causing your page to fail validation.

    Make sense?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Layout is wonky on single post page’ is closed to new replies.