Jump to content

Scrollable codebox for standard website


Recommended Posts

Hi guys,

I'm building up my website which was to be simple it would have been HTML 1.0 compliant. :P

However, I wanted the user to be able to hide/unhide some contents (fold/unfold in fact), and I started using javascript (1).

Then I wanted to color some lines and I started using CSS and now I love CSS.

Now, I am doing a codebox, and I would like (or need) that one to be scrollable just like on forums. However, I have no idea on what I should use. I tried to display the source of a webpage with such a thing and then to download the css, but I have not been able to find what was needed. :no:

Does anyone know what I should use ?

Thanks a lot. :hello:

Link to comment
Share on other sites


You could try:

<html>
<head>
</head>
<body>

<div style="width: 200px; height: 200px; oveflow: auto;">
Dont forget to set width and height!
</div>

</body>
</html>

Edited by MMx
Link to comment
Share on other sites

Wow, you joined two years ago and you first post to help.

Thanks a lot.

And your code worked. :w00t:

I've set in my css stylesheet and it's perfect.

Also, I found that it was not possible to use too small values for width and heigth (not under 200px), at least in IE6. But it is also possible to use "width:auto;". :)

And now I wonder why is this code absent from MSFN's CSS. :}

I mean, it was useful and as far as I'm concerned, I never has any problem. :?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...