Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
Jon Fritz
Jon FritzCorrect answer
Community Expert
Feb 24, 2017 5:49 PM UTC

This can be done pretty easily using just css and a standard html checkbox/label combo.

Is this sort of what you were looking to do (copy and paste into a new document, then preview and click on the bottom bar)...

<!doctype html>

<html lang="en-us">

<head>

<title>Slide In Footer (CSS Only)</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<style>

* {

    -webkit-text-size-adjust:100%;

    -webkit-box-sizing:border-box;

    box-sizing:border-box;

    padding:0;

    margin:0;

}

body {

    padding-bottom:2em; /* so other content in the body tag isn't hidden by the fixed slide in drawer */

}

#slide {

    display:block;

    position:fixed;

    width:100%;

    bottom:-7.5em;

    left:0;

    min-width:500px;

    background-color:black;

    color:white;

    text-align:center;

    font-family:Tahoma, Verdana, Arial, "sans-serif";

    transition:bottom 250ms, background-color 250ms;

    cursor:pointer;

}

.info {

    display:inline-block;

    margin:4em;

}

#check:checked + #slide {

    bottom:0;

    left:0;

    background-color:#002A0C;

}

#slide:hover {

    background-color:#002A0C;

}

.contact {

    display:block;

    position:absolute;

    top:0;

    left:0;

    padding:.3em;

    font-weight:bold;

    font-size:.8em;

    color:orange;

}

.contact::after {

    content:'\25b2';

}

#check:checked + #slide .contact::after {

    content:'\25bc';

}

#check {

    display:none;

}

</style>

</head>

<body>

<input type="checkbox" id="check" name="check">

    <label id="slide" for="check">

        <span class="contact">CONTACT US </span>

        <span class="info">Your Content Here</span>

    </label>

</body>

</html>

3 replies

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
Feb 24, 2017 5:49 PM UTC

This can be done pretty easily using just css and a standard html checkbox/label combo.

Is this sort of what you were looking to do (copy and paste into a new document, then preview and click on the bottom bar)...

<!doctype html>

<html lang="en-us">

<head>

<title>Slide In Footer (CSS Only)</title>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<style>

* {

    -webkit-text-size-adjust:100%;

    -webkit-box-sizing:border-box;

    box-sizing:border-box;

    padding:0;

    margin:0;

}

body {

    padding-bottom:2em; /* so other content in the body tag isn't hidden by the fixed slide in drawer */

}

#slide {

    display:block;

    position:fixed;

    width:100%;

    bottom:-7.5em;

    left:0;

    min-width:500px;

    background-color:black;

    color:white;

    text-align:center;

    font-family:Tahoma, Verdana, Arial, "sans-serif";

    transition:bottom 250ms, background-color 250ms;

    cursor:pointer;

}

.info {

    display:inline-block;

    margin:4em;

}

#check:checked + #slide {

    bottom:0;

    left:0;

    background-color:#002A0C;

}

#slide:hover {

    background-color:#002A0C;

}

.contact {

    display:block;

    position:absolute;

    top:0;

    left:0;

    padding:.3em;

    font-weight:bold;

    font-size:.8em;

    color:orange;

}

.contact::after {

    content:'\25b2';

}

#check:checked + #slide .contact::after {

    content:'\25bc';

}

#check {

    display:none;

}

</style>

</head>

<body>

<input type="checkbox" id="check" name="check">

    <label id="slide" for="check">

        <span class="contact">CONTACT US </span>

        <span class="info">Your Content Here</span>

    </label>

</body>

</html>

Translate
staceyk6093
Known Participant
Feb 28, 2017 6:02 PM UTC

This should work! thanks

Translate
Nancy OShea
Community Expert
Community Expert
Feb 23, 2017 12:24 AM UTC

With nothing more to go on, I'll say try Bootstrap Collapse

Nancy

Translate
Nancy O'Shea— Product User & Community Expert