Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#6733 closed defect (bug) (wontfix)

gallery html issue

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Gallery Keywords: has-patch tested
Focuses: Cc:


if you insert a floating div at the beginning of the content, and follow it with a gallery, it looks absolutely horrible. e.g.

<div style="float: left;">an author image</div>


the best fix, I believe, would be to automatically insert the following before the gallery code:

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

Attachments (1)

6733.diff (430 bytes) - added by Denis-de-Bernardy 7 years ago.

Download all attachments as: .zip

Change History (10)

#1 @Denis-de-Bernardy
8 years ago

adding this to the css also works:

.gallery { clear: both; }

#2 @pishmishy
7 years ago

I'm not a XHTML/CSS expert but surely if you know enough about these things to be inserting <div>s into the content of your posts my advice might be "don't do that then" ;-)

#3 @ryan
7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#4 @Denis-de-Bernardy
7 years ago

  • Keywords has-patch added
  • Milestone changed from 2.9 to 2.7.1

#5 @ryan
7 years ago

  • Component changed from General to Gallery
  • Owner anonymous deleted

#6 @hakre
7 years ago

i think in most cases it makes sense to have the css in. no need for an additional div in front of the gallery, but having the css in can make sense.

#7 @Denis-de-Bernardy
7 years ago

  • Keywords tested added
  • Milestone changed from 2.7.2 to 2.8

#8 @azaozz
7 years ago

Potentially this can break some themes. Best would be to add the gallery's styles to the theme's css. This will ensure there aren't any collisions/unexpected behaviour.

#9 @Denis-de-Bernardy
7 years ago

  • Milestone 2.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed


Note: See TracTickets for help on using tickets.