| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
|
|
#2 (permalink) |
|
knocking heads
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
|
in css you can use "overflow: auto" on a div which automatically gives horizontal/vertical scrollbars if any of the content doesnt fit in the div (u need to give it a specific width and size) you cant give a scrollbar custom graphics/colours, to do that you'll either have to use a mixture of CSS and javascript or do it in flash |
|
|
|
#3 (permalink) |
|
Senior Member
Join Date: Apr 2005
Location: Toronto, Canada
Posts: 162
|
Sorry, I wasn't be specific enough. I actually was wondering how to have elements broken up horizontally. Each news item would have it's own div, followed by a giant french-bracket. Any ideas how? |
|
|
|
#4 (permalink) |
|
knocking heads
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
|
off the top of my head... Code:
etc etc, obviously it would be better to create a class with that in... spans would be better, as theyre for inline items, but if u want to contain things like <p></p> in the sections, divs would have to be used as your not allowed to use block elements within inline elements |
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
How about not creating more divs than necessary? How about: <div class="newsItem"> <h4>New Heading</h4> <p>Other Content</p> </div> .newsItem { background: url(path/to/bracket-image.gif) no-repeat top right transparent; padding-right: 50px; } Voila! |
|
|
|
#8 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Just so you know, that scrollbar is horribly ugly on Windows. Not too attractive on OSX either, but at least it's not offensive and distracting. Perhaps use a JavaScript bit of trickery to create "scrolling"? Code:
|
|
|
|
#9 (permalink) |
|
Senior Member
Join Date: Apr 2005
Location: Toronto, Canada
Posts: 162
|
The MS code doesn't interfere with anything, so I'll just leave that. The colors are fine. I'm more interested in getting the div content to span fully horizontal with-out breaking. Can anyone help? |
|
|
|
#10 (permalink) | ||
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Quote:
Might as well just go back to using nested tables, spacer gifs and font tags while you're at it. It also interferes with your code being valid... Quote:
Also, the fact that you're floating elements within the overflowed div means that when the width of the floated element reaches the width of the scrolling container, they'll automatically jump down below. Not stay to the side. If I were you, I'd find another way to do this or use some fancy JavaScript or use Flash. Do you have any examples of this sort of thing being done on other sites? |
||
|
![]() |