Styling attachment id with css or preg_replace?
-
Dear all,
I’m building a photo website that scrolls horizontally where WP post will be image galleries.
I’d like my images to have captions but I can’t find a way to style with CSS the<div id="attachment_[number]...>
I’m getting from the_content() (now it forces a line break… quite annoying for a site that’d like to scroll horizontally…).The_content()’s output is as follows:
<div class="entry"> <div id="attachment_123" class="wp-caption aligncenter"> <a href="..."> <img src="..."/> </a> <p class="wp-caption-text">Caption 1</p> </div> <div id="attachment_456" class="wp-caption aligncenter"> <a href="..."> <img src="..."/> </a> <p class="wp-caption-text">Caption 2</p> </div> </div>
Is there a simple way to style those attachment_[number] id with a changing [number] or do I have to modify the output of the_content() with a preg_replace? How then?
Regards,
Matteo
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Styling attachment id with css or preg_replace?’ is closed to new replies.