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>
Question
Pippin666
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 ??
Pip'
Link to comment
https://www.neowin.net/forum/topic/744268-html-spoiler-coding-help/Share on other sites
2 answers to this question
Recommended Posts