WordPress.org

Ready to get started?Download WordPress

Forums

Default Text Widget HTML Breaks Layout in IE6, IE7 & IE8 (8 posts)

  1. taylorehat
    Member
    Posted 3 years ago #

    Since version 3.0.2 there is this nagging bug in default-widgets.php file with the Text widgets class (Line 383) Using the DIV to wrap the LI group makes IE brainfart in the nested "Primary" widget area.

    The issue is that IE doesn't like the UL > LI > DIV > LI implementation. And it forces IE to read a closing UL prematurely and breaks the HTML.

    Every time I upgrade I have to go in and edit this line to fix the display issue:

    From:
    <div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div>

    To:
    <ul class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?>

    Can this fix be included in the next patch?

  2. clwill
    Member
    Posted 3 years ago #

    Really, this is broken, can this get fixed, please?

  3. up2early
    Member
    Posted 3 years ago #

    Where do I find "Text widgets class (Line 383)"?

    Thanks!

  4. taylorehat
    Member
    Posted 3 years ago #

    WordPress Main Directory > wp-includes > default-widgets.php (Line 383)

    It is part of the Text Widget Class

    Currently it is wrapping the a set of
    <li>'s with a <div>. IE doesn't like the order and I am assuming it is picking up the closing </div> and closing the widget prematurely, breaking the layout.

    Good luck!

  5. up2early
    Member
    Posted 3 years ago #

    Thanks taylorehat, but I am still having the text widget loading below everything on cornellsrestaurant.com after applying the change on IE 6.

    IE 6 should be outlawed at this point!

  6. taylorehat - Next time, PLEASE wrap your LI and DIVS in code tags :) You borked the layout of the page ;)

    Honestly, I've never seen this be a problem before. Report it on trac, but I'm pretty surprised.

  7. taylorehat
    Member
    Posted 3 years ago #

    up2early: Try wrapping the html content your placing in your text widget with an li tag. It looks like you've got this:

    <ul class="textwidget">
    
    ... Your table and Facebook widget html you've added in WP Admin.
    
    </ul>

    try this...

    <ul class="textwidget">
    
    <li>
    ... Wrap Your table and Facebook widget html you've added in WP Admin within an LI.
    </li>
    
    </ul>

    Maybe IE6 will like it better?

    lpstenu: Sorry, I totally forgot to wrap my html with code tags. Also, when I posted this here I assumed it was posted to trac. I will have to do that.

  8. up2early
    Member
    Posted 3 years ago #

    taylorehat:thanks for the suggestion but adding the
    <li> and </li>
    tags in WP admin did not change anything in IE6.

    Thanks for all your help, very much appreciated to this obvious newb.

Topic Closed

This topic has been closed to new replies.

About this Topic