/    Sign up×
Community /Pin to ProfileBookmark

Drop-down panel doesn’t push down the container below

I have added this code to a web page where a page visitor can click the down arrow which drops down a panel successfully. However, the div container (Container1) ()below the panel) doesn’t push down properly when the panel drops down. The panel appears to drop down behind the Container1. I’m looking for guidance on how to have Container1 properly push down when the panel drops down. Any assistance is appreciated.

“`
<script>
$(document).ready(function(){
$(“#flip”).click(function(){
$(“#panel”).slideToggle(“slow”);
});
});
</script>
</head>
<body>

<div id=”flip”>Panel Controls <img src=”/images/chevron.png” alt=”arrow down”></div>
<div id=”panel”>
<div class=”enter-text”>
<textarea name=”comments” id=”comments” placeholder=”Enter Text Here</textarea>
<button id=”submit”>Submit</button>
</div>
<div class=”buttons”>
<span><button id=”start” onclick=”initialize()”>Start</button></span>
<span><button id=”stop” onclick=”clearInterval(lefttime)”>Stop</button></span>
</div>
</div>

<div id=”Container1″>
</div>
“`

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@daveyerwinJul 14.2021 — @chrisjchrisj#1634153

<textarea name="comments" id="comments" placeholder="Enter Text Here</textarea>

should be ...

<textarea name="comments" id="comments" placeholder="Enter Text Here"></textarea>
Copy linkTweet thisAlerts:
@chrisjchrisjauthorJul 14.2021 — Than ks for your kind reply.

It is already actually:

&lt;textarea name="comments" id="comments" placeholder="Enter Text Here"&gt;&lt;/textarea&gt;

my truncating it for copying over to this posting I lost the >

so, if any other suggeation is appreciated.
Copy linkTweet thisAlerts:
@daveyerwinJul 14.2021 — ``<i>
</i>&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;style&gt;
body{margin:0px;color:#252430;background-color:#eee}
p{margin-top: 10em; font-size: 2em;}
&lt;/style&gt;
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;div id="flip"&gt;
Panel Controls
&lt;img src="/images/chevron.png" alt="arrow down"&gt;
&lt;/div&gt;
&lt;div id="panel"&gt;
&lt;div class="enter-text"&gt;
&lt;textarea name="comments" id="comments" placeholder="Enter Text Here"&gt;
&lt;/textarea&gt;
&lt;button id="submit"&gt;
Submit
&lt;/button&gt;
&lt;/div&gt;
&lt;div class="buttons"&gt;
&lt;span&gt;
&lt;button id="start" onclick="initialize()"&gt;
Start
&lt;/button&gt;
&lt;/span&gt;
&lt;span&gt;
&lt;button id="stop" onclick="clearInterval(lefttime)"&gt;
Stop
&lt;/button&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;div id="Container1"&gt;
xxxxxxxxxxxxxxxxxxxxxxxxx
&lt;/div&gt;

&lt;script&gt;$("#panel").toggle();&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt; <i>
</i>
``
×

Success!

Help @chrisjchrisj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...