HTML & CSS
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?
Try to set a margin or padding for your div.
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.
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
or, if you only want to pad the right-hand side
Another way to do that same trick is:
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.
yeah sorry, I actually did use padding-right, was late last night when I posted, so I typed it out wrong
This topic is now closed. New replies are no longer allowed.