I need a sort of iframe in a website I'm designing. Whats the best way to do this in css? Just a div or what? I need a scroller on it though as the content will be pretty long and needs to be "scrollable" - it'll also be centered to about 800px. I'd like a coloured scrollbar - just wondering does anyone know the best way to go around this? Thanks, Le007 example of what I'm after: http://www.frame.dk/#/WORK
Don't use iframes. Here's an example how to do it with div tags instead: <div style="width: 600px; height: 400px; overflow:auto;"> Your text here. Needs to be long enough for the vertical scroller to show. </div> Code (markup):
Shortest and best phrase ever containing the XHTML/CSS and iframe keywords. Simply put, In XHTML 1.0 Strict, for instance, the iframe tag is not allowed.
I'll post it again, looks like you've missed my reply, or are unaware that it is the answer to your question <div style="width: 600px; height: 400px; overflow:auto;"> Your text here. Needs to be long enough for the vertical scroller to show. </div> Code (markup):
Yeah, but will a scrollbar appear and if so is that stye-able as I'm looking for this type of effect? Thanks guyz http://www.frame.dk/#/WORK
Teh scrollbars, ze are mah scrollbars, not yours. MINE! You isn't touchin' mah scrollbarz. You isn't touchin' mah input type=file buttunz, you isn't touchin mah browser menuz, you isn't touchin' mah browser. Not without a pile of scripts, the likes of which I ain't lettin in MAH browser. : ) Though IE does have proprietary scrollbar codez in CSS which are not valid but don't hurt anything.
If you're looking to generate valid CSS, then you simply don't. Most browsers ignore custom scroll bar colors anyway (with the exception of some older IE versions). However, if you still want to go ahead and change them, you can use this generator to help you out.