• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Html Spoiler Coding HELP

Question

Pippin666    0

Thank you for stopping by. I hate to open thread simply because I need help. I love to search (google), but this time I am clueless. I am building a small webpage for friend and me and ... I wish to use a spoiler function with a button. Wich is done using the code below. BUT, I would like the scrollbars to be IN the frame and not on the right border of the window.

Possible ??

<html>
<head>
	<title>Spoiler HTML code</title>
	<style type="text/css">
body,input
	{
	font-family:"Trebuchet ms",arial;font-size:0.9em;
	bgcolor:#000000;
	}
.spoiler
	{
	border:1px solid #ddd;
	padding:1px;
	}
.spoiler .inner
	{
	border:1px solid #eee;
	padding:1px;margin:3px;
	}
	</style>
	<script type="text/javascript">
function showSpoiler(obj)
	{
	var inner = obj.parentNode.getElementsByTagName("div")[0];
	if (inner.style.display == "none")
		inner.style.display = "";
	else
		inner.style.display = "none";
	}
	</script>
</head>
<body BGCOLOR="#000000" TEXT=WHITE LINK=WHITE VLINK=WHITE ALINK=WHITE>

<div class="spoiler">
	<input type="button" onclick="showSpoiler(this);" value="Fran?ais" />
	<div class="inner" style="display:none;">

THE SPOILER TEXT IS HERE

	</div>
</div>
</body>
</html>

Pip'

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Mathachew    149

Moved to Web Client Side

Share this post


Link to post
Share on other sites
  • 0
The_Decryptor    1,105

.spoiler .inner {
	overflow: auto;
}

Try that.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.