Home > database >  How to center terminal HTML
How to center terminal HTML

Time:11-14

Fairly self explanatory.

 <link href="C:\Users\Andre\Desktop\FOLDER\css\xterm.css" rel="stylesheet" /> <!--Terminal-->
<div id="terminal"></div>
<script src="./xterm.js"></script> <!-- Terminal -->
<script>
    var term = new Terminal();
    term.open(document.getElementById('terminal'));
    term.write('Hello Again');
</script>

Here is my css file that it's connected to and how I tried to center it, I realize it's a different type, so I wasn't sure how to go about it

#terminal{
    align-content:center;
}

Any help on centering this would be appreciated

CodePudding user response:

#terminal {
    text-align: center;
}

CodePudding user response:

maybe try this :

#terminal{
    margin: auto;
    width : 300px;
}
  • Related