WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > WordPress grid display without extra div tags

Reply
  Thread Tools Display Modes
Old 4th June 14, 05:46 AM   #1
FredTheValet
WLC Member
 
Join Date: Jun 2014
Location: Cape Cod, MA
Posts: 1
Default WordPress grid display without extra div tags

I'm working on a WordPress page, and the custom wants a grid layout
with an image/text combo, basically:

IMAGE TEXT IMAGE TEXT

IMAGE TEXT IMAGE TEXT

If that were all there were, I could do it, but each text block has a header with space between it and the main text. So each "group" of tags for one Image + text combo looks like:

`<p><img></p><h4>heading</h4><p>text<p>`

Without adding additional div's (which I don't think I can do - little control over WordPress content), how do I put the IMG paragraph next to the H4/P combo (which would be one on top of the other)?

Boy, I hope I'm explaining this well.

Oh ... I tried using `<strong>` instead of `<h4>`, which gives me all the text inside one paragraph tag, but they want extra space between the header and text - so I increased the line-height for the H4 tag, but if the header wraps around to a 2nd line, the line spacing of the header text is all wonky.

Any suggestions?

TIA

- Fred.
FredTheValet is offline   Reply With Quote
Old 4th June 14, 06:31 AM   #2
meesa
WLC Mod
 
meesa's Avatar
 
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,711
Default Re: WordPress grid display without extra div tags

Have you floated the h4?
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum.
meesa is offline   Reply With Quote
Old 4th June 14, 12:53 PM   #3
ronaldroe
WLC Lover
 
ronaldroe's Avatar
 
Join Date: Feb 2013
Posts: 197
Default Re: WordPress grid display without extra div tags

I hate to say it, but there's really no better way to do it than to wrap another element around it and use that as a boundary for the content. Even if you could figure it out, what happens when the paragraph text becomes longer than the image? It'll wrap around the image then.
You won't hear me say things like that often. I'd be the first to tell you not to do it if I thought it'd work properly without. I will say that you probably don't need the <p> tags around the image.
__________________
Sometimes, I'm astounded by my own eloquence.
ronaldroe is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:59 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.