Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Inline DIVs

  1. #1
    New Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inline DIVs

    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-...tory-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?

  • #2
    New Coder
    Join Date
    Nov 2010
    Location
    Virginia,USA
    Posts
    36
    Thanks
    1
    Thanked 7 Times in 7 Posts
    This might be the problem

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

  • #3
    New Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    New Coder
    Join Date
    Nov 2010
    Location
    Virginia,USA
    Posts
    36
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by OscarGuy View Post
    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.

  • #5
    New Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    New Coder
    Join Date
    Mar 2012
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •