WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 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:

Description

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>

[gallery]

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 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 @Denis-de-Bernardy7 years ago

adding this to the css also works:

.gallery { clear: both; }

comment:2 @pishmishy7 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" ;-)

comment:3 @ryan7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

@Denis-de-Bernardy6 years ago

comment:4 @Denis-de-Bernardy6 years ago

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

comment:5 @ryan6 years ago

  • Component changed from General to Gallery
  • Owner anonymous deleted

comment:6 @hakre6 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.

comment:7 @Denis-de-Bernardy6 years ago

  • Keywords tested added
  • Milestone changed from 2.7.2 to 2.8

comment:8 @azaozz6 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.

comment:9 @Denis-de-Bernardy6 years ago

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

ok

Note: See TracTickets for help on using tickets.