Forums

[resolved] i want a scrollbar when the post is too long (13 posts)

  1. themanfromph
    Member
    Posted 2 years ago #

    how to put scrollbar whenever a post is long?

  2. Edward Caissie
    Member
    Posted 2 years ago #

    Hmmm ... that could be related to an overflow statement in the CSS for the item you want to have scroll bars on.

    An example would be a bit more helpful ... are you having this issue with your blog, or just trying to keep it in mind while creating a theme?

  3. themanfromph
    Member
    Posted 2 years ago #

    i want it to appear at my posts...so that the footer will be seen w/out going to the bottom of my page...how to put it?

  4. buddha trance
    Member
    Posted 2 years ago #

    @cais - this is a great solution!

    @themanfromph - I just tested it and it works.

    In style.css of the theme, there is the content class, most likely as
    .entry-content (if you can't find it, post your URL)
    add the overflow property, also by setting a desired height, like this

    height: 600px;
    overflow: scroll;
  5. buddha trance
    Member
    Posted 2 years ago #

    Add some padding too, so the scroll bar is not too attached to the text

    height: 600px;
    overflow: scroll;
    padding: 10px;
  6. Mark / t31os
    Moderator
    Posted 2 years ago #

    What about people with larger monitors?...

    There's a reason most people use dynamic height.

    NOTE: overflow: scroll; will generate scrollbars regardless of whether the content exceeds the height or not..

    Use overflow:auto and you'll only get the scrollbars when the content warrants them.

  7. themanfromph
    Member
    Posted 2 years ago #

    i can't see .entry-content in my style.css
    here is my BLOG

  8. buddha trance
    Member
    Posted 2 years ago #

    Add it to .articleContent
    t31os_ is right, use overflow: auto; (instead of scroll)

  9. themanfromph
    Member
    Posted 2 years ago #

    nothing happens...

  10. buddha trance
    Member
    Posted 2 years ago #

    I tested again and it works. Make the height to 400px to test, since some posts are shorter than 600px. Adjust the css accordingly.

    .articleContent {
    	width: 570px;
    	padding: 10px 15px 0 15px;
    	background: url('images/articleBg.png') repeat-y;
            height: 400px;
            overflow: auto;
    }
  11. themanfromph
    Member
    Posted 2 years ago #

    it now workded... tnx...
    how about putting color on it so its more attractive at Internet Explorer

  12. buddha trance
    Member
    Posted 2 years ago #

    Replace
    background: url('images/articleBg.png') repeat-y;

    with
    background-color: #F5F5F5;

    and pick your color from these css color values:
    http://www.w3schools.com/css/css_colorsfull.asp

    To learn some css:
    http://www.w3schools.com/css/default.asp

  13. themanfromph
    Member
    Posted 2 years ago #

    ohhh... very thanks...
    how about putting scrollbar color at the (the longest scrollbars)
    in Internet Explorer

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.