WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Long post title overlapping onto second post title in sidebar (12 posts)

  1. athique
    Member
    Posted 7 years ago #

    Hi,

    I think the picture will explain best...

    http://i19.tinypic.com/4yis2s8.jpg

    I'm using the Merdeka theme from ikram-zidane.com and as you can see I have quite a long post title which is overlapping onto a different post title.

    My question is, how would I edit the template in order to make it so that long post titles use more than a single line if they need to?

    If you need to see the template or anything else just ask.

    Hope you can help. Thanks.

  2. moshu
    Member
    Posted 7 years ago #

    There is no code in the picture :)

  3. athique
    Member
    Posted 7 years ago #

    No code? What part of the code do you need to see exactly?

    The sidebar? Stylesheet? Or perhaps something else?

  4. Ma8thew
    Member
    Posted 7 years ago #

    I would suggest the theme creator might have hardcoded the height of those rows. Have a look at the CSS for element the text is contained within, and see if it has a 'height' attribute. Get rid of this, and see what happens! If you show me a site using the template, I can probably tell you what you need to do.

  5. moshu
    Member
    Posted 7 years ago #

    What part of the code do you need to see exactly

    Your blog.

  6. athique
    Member
    Posted 7 years ago #

    My site... http://www.athique.co.uk is currently using the template so you could look at that if you like

  7. moshu
    Member
    Posted 7 years ago #

    What Ma8thew said: remove the height:

    #navigation ul li a {
    border-bottom: 1px solid #444444;
    display: block;
    text-decoration: none;
    padding: 0;
    margin: 0;
    height: 20px;  <==== this!
    }
  8. athique
    Member
    Posted 7 years ago #

    Yep...that did it. Thanks to you both.

  9. Jeremy Clark
    Moderator
    Posted 7 years ago #

    You could add this to your style sheet

    #navigation ul li {
    overflow: hidden;
    }

    This will hide anything that moves onto the second line.

  10. Ma8thew
    Member
    Posted 7 years ago #

    Edit the class #navigation ul li a. Change the height attribute to auto
    [EDIT]
    Damn, too slow!

  11. athique
    Member
    Posted 7 years ago #

    The overflow: hidden; attribute doesn't seem to work for whatever reason.

    What exactly does the height: auto; attribute do here?

  12. Ma8thew
    Member
    Posted 7 years ago #

    Height:auto allows the container to expand to the height needed to show all its content without it overflowing. The height attribute defaults to auto, but I told you to define it as auto in case it inherited a different height attribute.
    If you had changed to Overflow:hidden, the browser simply would have hidden any content that overflowed the container. This would not be as good as changing height to auto

Topic Closed

This topic has been closed to new replies.

About this Topic