|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Vertical Only Scrollbar (CSS)
Again, I'm working on my first page useing CSS and I'm turning to my beloved Codewalkers for help. I would like to have the content section of my page have only a vertical scroll bar, an no horizontal one. How can I make content wrap if it goes over horizontaly, but scroll if it goes out of bounds verticaly?
|
|
#2
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
For this you can use the overflow property. It's values are as follows: visible | hidden | scroll | auto
Example: .info { position: absolute; top: 20px; left: 85px; width: 499px; overflow-y: scroll; overflow-x: hidden; padding-right: 5px; visibility: visible; border: thin solid white; background-color: #336699; scrollbar-face-color: #336699; scrollbar-3dlight-color: #336699; scrollbar-base-color: #336699; scrollbar-track-color: #336699; scrollbar-darkshadow-color: #000; scrollbar-arrow-color: #000; scrollbar-shadow-color: #fff; scrollbar-highlight-color: #fff; } Some properties are not always supported by all browsers. |
|
#3
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
overflow-y: scroll;
overflow-x: hidden; These don't seem to be recognized as real CSS and are only supported by IE. |
|
#4
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
just use
overflow: auto; |
|
#5
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
Thats what I'm useing now, but I would like my content to wrap horizontaly and never have a horizontal scroll bar
|
|
#6
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
it should already do that..
doesn't it? can you show me the page? |
|
#7
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
|
|
#8
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
that is not a normal text.. normal text has spaces, and it works for normal text.
anyway, what should CSS do in that case? break those long words? where exactly? and how should it note that? how can it know what words shouldn't (can't) be broken? in short: you can't do that.. |
|
#9
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
Ahh yes... I see your point. Did you notice that the title of the page "News" kinda hung into the text area (if you're useing anything but IE)?? Do you know what might be causeing that? From what I can see, all my div tags are closed properly. The CSS file is here http://www.captainsupreme.com/newpage/cptsup.css if that helps.
|
|
#10
|
|||
|
|||
|
RE: Vertical Only Scrollbar (CSS)
add:
clear: both; to the css rules for the #section. and if you want to know more about floats, read this http://www.complexspiral.com/publications/containing-floats/ |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Vertical Only Scrollbar (CSS) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|