Issue
I am working on a project that has a part where I need text to be centered, but when I use text-align:center;
this is what happens
Where the Hosting for school projects is off the line of being inline of Independent Study text.
Solution
Note that the width
styles of both containers are equal in the example below.
body {
background-color: black;
}
.first {
width: 400px; /* the widht style of the first container is set to 400px. */
text-align: center;
border: 1px solid red;
color: white;
}
.second {
width: 400px; /* the widht style of the second container is set to 400px. */
text-align: center;
border: 1px solid blue;
color: white;
}
<body>
<div class="first">
<h1>Independent Study</h1>
</div><br>
<div class="second">
<h3>Hosting for school projects</h3>
</div>
</body>
Answered By - Sercan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.