...

View Full Version : Inline DIVs



OscarGuy
05-19-2012, 05:32 PM
This may not be exactly what they are called, but I recently had some people help me set up a CSS notation that would enable me to display an image to the right of a set of text when you hover over the text. This was done using div classes. The problem is that these are being housed within a line of text in the document that is encased in an <h4> tag.

It may not be the <h4> tag's fault as I think it's a DIV issue, but in essence, the DIV is causing extra lines after the </h4> tag closes than normal. Here's a link to a page with the specific issue:

http://www.cinemasight.com/this-day-in-oscar-history-may-17-3/

The first item for Jack Patrick is how it's supposed to display when there's no [Pictured] link. The third item down for Bob Merrill is how it's displaying with the [Pictured] hover div. Notice how the space under the name and [Pictured] has a taller set of blank space than the other? That's what I'm trying to eliminate. Is there something I add to cause the div not to add blank space beneath?

badwolf
05-19-2012, 06:44 PM
This might be the problem


<p></span></h4>

You dont have a closing paragraph " </p> " all the way down the page from where your layout breaks.

OscarGuy
05-20-2012, 03:56 AM
strange. shouldn't be a <p> tag in there at all. I even went back to look at my code that's in the post and there's not a <p> tag. Would wordpress be adding one somewhere?

badwolf
05-20-2012, 05:22 AM
strange. shouldn't be a <p> tag in there at all. I even went back to look at my code that's in the post and there's not a <p> tag. Would wordpress be adding one somewhere?

Must be because if you look at your source code its very much there. And it isnt closing the paragraph tag.

OscarGuy
05-20-2012, 03:35 PM
Thanks for the catch. I've now discovered that Wordpress is adding all manners of open-ended paragraph tags and never closing them automatically, but if I take out the option to enable that, I have to add <br /> tags manually, which is a bit of a pain when I have thousands of posts already out there.

I've posted a question on their forums hoping they can tell me how to switch it from adding <p> tags to adding <br /> tags and also how to get it not to add tags in the middle of continuous lines of code.

OscarGuy
05-20-2012, 03:41 PM
Well, I sort of fixed my own problem. I changed the div to a span in the stylesheet and the post and it works correctly. It appears wordpress not only adds <p>'s to start line breaks, but it also adds it after a </div> inside a post. Annoying still that they are open and never closed, but I can live with it until they can fix it otherwise.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum