troubleshooting Question

HTML buttons side by side

Avatar of bidgadget
bidgadgetFlag for United States of America asked on
CSSHTML
2 Comments1 Solution7 ViewsLast Modified:
I have created a audio play page and need to display two buttons side by side in HTML.  I am using the inline-block display and the buttons are still not appearing side by side
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>

    <style>
        button {
            display: inline-block;
            margin: 5px; /* space between buttons */
            background: #b06f97; /* background color */
            color: #333; /* text color */
            font-size: 1.5em;
            font-family: ‘Georgia’, serif;
            font-style: italic;
            border-radius: 50px; /* rounded corners */
            padding: 8px 16px; /* space around text */
            -moz-transition: all 0.2s;
            -webkit-transition: all 0.2s;
            transition: all 0.2s;
            float:unset;
        }
    </style>
    <button onclick="setPlaySpeed()" type="button">1.5x Speed</button><br>  <button onclick="setPlaySpeed3()" type="button">1x Speed</button><br>

    <video id="myVideo" width="320" height="176" controls>
        <source src="audio/audio/nextechfinal2.mp3" type="video/mp4">
        <source src="mov_bbb.ogg" type="video/ogg">
        Your browser does not support HTML5 video.
    </video>




    <script>
        var vid = document.getElementById("myVideo");

        function getPlaySpeed() {
            alert(vid.playbackRate);
        }

        function setPlaySpeed() {
            vid.playbackRate = 1.5;
        }

        function setPlaySpeed3() {
            vid.playbackRate = 1;
        }


    </script>


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros