Advice needed: Alternative to using div elements to arrange content
-
Hello.
I organize content on my content using a fairly simple approach. I switch to the text editor, paste the following code, and switch back to the visual editor to write.
<section class="g-item"> <h3>Title</h3> <div class="g-pic">Photo goes here.</div> <div class="g-desc">A few paragraphs here.</div> </section>
I have multiple such sections per page, which simply allow me to have a picture (g-pic) on the left while having the related text or the description (g-desc) floating right next to it.
My problem is – WordPress randomly removes the first paragraph inside those divs (issue #20943 on the bugtracker), pressing Enter sometimes adds another div instead of starting a new paragraph, simply switching from text to visual editor tends to mess with my formatting. All in all, it’s really frustrating.
What would be an alternative method to organize my content in such way? Is there a possible way to do this, or is WordPress just not suited for something list this? I feel every time I click on the Text editor tab I’m taking a sizable risk that my formatting will be gone.
- The topic ‘Advice needed: Alternative to using div elements to arrange content’ is closed to new replies.