Need to pad a <div> with a vertical scroll

  • TracyLaugle
  • Born
  • Born
  • TracyLaugle
  • Posts: 1

Post 3+ Months Ago

Hi! I have a problem I'm trying to work out. I have an unordered list that is way too long for the page. Of course, the browser has a vertical scroll, but I wanted to put in a scroll myself so that the list only appears between my left and right columns, which are 900px high. I have a scroll bar working, and my issue is this: the text has no padding on the right by the scroll bar - it goes right up to the scroll bar. How do I add the padding? Here is my current css code:

Code: [ Select ]
#scroll    {width: 100%;
         height: 590px;
         overflow: auto;}
  1. #scroll    {width: 100%;
  2.          height: 590px;
  3.          overflow: auto;}


I tried to add the following into the above section:

Code: [ Select ]
padding-right: 15px;


This pushes the whole list section (and its scroll bar) down below my left and right columns, defeating the whole purpose. Can anyone help me make this work?

Thanks,
Tracy
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • natas
  • PHP Ninja
  • Proficient
  • natas
  • Posts: 308
  • Loc: AFK

Post 3+ Months Ago

Try adding the "padding" declaration to your unordered list.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 82 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.