SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Overflow - space between text and scrollbar

    Hi,

    I am trying out the overflow attributes of CSS. I've noticed that the text gets squashed up right next to the scrollbar, it looks bad and makes it hard to read. Is there a way to set the space between the text and the scrollbar?

    Thanks
    coiL
    "cradled in the learning curve"

  2. #2
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try to set a margin or padding for your div.
    Keith Rousseau

  3. #3
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I had already tried setting a margin (it didn't work) but I hadn't thought to use padding. I tried padding: right; and it worked fine for me.


    Thanks
    coiL
    "cradled in the learning curve"

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry, but padding: right is not valid CSS. padding can only have a value assigned to it (e.g. 1em, 10px, 5% or whatever).
    the reason it worked for you (probably in some specific browser only) is that "right" is somehow re-interpreted into a numeric value.
    to make a long speech short, the correct way of doing it would be either using
    Code:
    padding: 10px;
    or, if you only want to pad the right-hand side
    Code:
    padding-right: 10px;
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another way to do that same trick is:
    Code:
    padding: 0px 0px 5px 0px;
    In this case, you can specify all four padding values in a single line. The order is clockwise: top, right, bottom, left.
    I officially have been writing too much css lately, I just tried to end a sentence with a semi colon.
    Keith Rousseau

  6. #6
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah sorry, I actually did use padding-right, was late last night when I posted, so I typed it out wrong
    coiL
    "cradled in the learning curve"


Bookmarks

Posting Permissions

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