Is it possible to have a box (for example 400 pixels by 300 pixels) where text can be displayed and if it doesn’t fit in the box it is scrollable, but without the use of frames?
<style type="text/css"> .iframe { overflow:auto; height:400px; width:300px; } </style> <div class="iframe">Text goes here</div> HTML:
Thank you. I always though iframes are the same thing as frames and thus not search engine friendly. I am going to try your code. thank you It works Is there also a way to get the scrolls in a certain color, instead of the normal grey?
IFRAMES are seo-unfriendly. The code I use is for a fake iframe using css. CSS can do the coloured scrollbars
Those are a proprietary property set of IE (though I think Opera has some support for them), and are not a part of css. It is my opinion that the main scroll bars are part of the application (browser) and belong to the user. they should not be tampered with. I am not so adamant where interior scroll bars are concerned, as in this case. Just be aware that not all browsers will let you affect the scroll bars. cheers, gary
Some quick Css coding Check this out http://abhishektripathi.com/noframe.html Is this what you want ??? See the html from the source ... and the css can be found here .... http://abhishektripathi.com/abhishek.css Hope it helped, Abhishek
Actionally, a scrollable are can be released with Javascript to. My question is: which is the better solution: CSS or Javascript? THX!
css : #scroll { width: 200px; height: 100px; overflow: auto; border: 1px solid black; } html : <div id="scroll"> Make text so that it will be more than box of 200px x 100px and it will make auto scroll area ! ... If you make text shorter there will be no scroll </div>
Check this out .. it's been done using CSS http://abhishektripathi.com/noframe.html the css can be found here .... http://abhishektripathi.com/abhishek.css
We are talking about Scrollable Area ... much like the frames ... and not scrolling text ... Look before you speak ...
This is the original post. I think that we are talking about a fixed sized area. I don't want to argue...
So what Have I done ?? It was depiction that this can be done without frames ... I am not supposed to be coding the entire work he asks for
wow like it is hard to write few lines ??? ... it is not like you will code entire site ... the OP just asked a little help .... oh yes btw .. i feel like giving you red rep ... it is coming now
Nah this site was done for a friend ... who wanted her site created ....using this method ...incidentally this person asked the same thing here ... and I pasted the same links to him .... Red rep ..duhh ... go ahead ... "Edit" She started with frontpage and used frames ... i suggested this .... Abhishek
Btw ... I think I helped the person alright .... by providing him links to this page and the css file .. this must have given him an insight of what can be done and what cannot .... setting the "auto" values to 400px would take like 2 seconds or so ... and arent tht hard .... I don’t like to give too many exact examples, because I don’t like people to miss the big picture. I don’t want to teach people, I want people to understand what I mean and how they can benefit from it. Abhishek