What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

Can't figure out how to fix my html code

ubuntu4u2

New member
Joined
Aug 31, 2022
Messages
3
Reaction score
0
HTML Coins
0
Hi Everyone!


I'm new to HTML and I enjoy learning very much!


I have a problem that I can't figure out the solution to after many hours of trying

I have four boxes. Under each box is some text. I want all four boxes centered on the page with text under. but nothing I seem to do works. N ot even <center> works.

Here is my html code. What do I need to do to get things centered?

Thank you!


<html>
<head>
</head>
<body>
<style>
div {
width: 954px;
<!-- border: 2px solid red; -->
}
.b {
width: 954px;
text-align: left;
font-family: Times New Roman;
}
.card {
max-width: 191px;
margin: 10px 30px 10px 30px;
float: left;
text-align: left;
padding-right: 0px;
font-family: Times New Roman;
}
.card3 {
max-width: 191px;
margin: 20px;
float: left;
text-align: justify;
padding-right: 60px;
font-family: Times New Roman;
}
</style>
<center>
<div class="b">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</center>
</div>
<div class="card">
<img src="https://encrypted-tbn0.gstatic.com/...nVxsreL_5DkWtD1slKca9zbgpGfljUH4bY74&usqp=CAU" alt="Box 1" style="width:191px">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua..</p>
</div>
<div class="card">
<img src="https://encrypted-tbn0.gstatic.com/...nVxsreL_5DkWtD1slKca9zbgpGfljUH4bY74&usqp=CAU" alt="Box 2" style="width:191px">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
<div class="card">
<img src="https://encrypted-tbn0.gstatic.com/...VxsreL_5DkWtD1slKca9zbgpGfljUH4bY74&usqp=CAUt" alt="Box 3" style="width:191px">
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
<div class="card">
<img src="https://encrypted-tbn0.gstatic.com/...nVxsreL_5DkWtD1slKca9zbgpGfljUH4bY74&usqp=CAU" alt="Box 4" style="width:191px">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</body>
</html>
 

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back