Below are the codes and attached is the error. There is an error in the align property in style.css. Make sure to fix that error and show screenshots of the correct code and output. index.html Document Summer School Summer School Info Mainpage summerschool.html Mainpage Mainpage Love Hate Summer School Info Mainpage style.css h1 { text-align: center; color: #5e2943; font-size: xx-large; border-style: dotted; } ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #550913; } li { float: left; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } li a:hover { background-color: #afe6e9; } body { margin: 0; padding: 0; display: grid; place-items: center; min-height: 100vh; } .sidebar-header { background-color: f2d7ee; padding: 50px 20px; align: left; /* Align buttons to the left */ margin-right: 1000px; margin-left : 10px; } .button-container { align: left; margin-left: 5px; /* Add some margin to separate buttons from the edge */ } .button { --button-offset: 0.48em; --bg: 178, 60%, 48%; background-color: rgb(0, 143, 232); border: 0; border-radius: 0.2em; padding: 0.1em; font-size: 2rem; font-weight: 300; text-transform: uppercase; box-shadow: 0 8px 0 0 hsla(180, 13%, 12%, 0.5); cursor: pointer; display: block; /* Make buttons block-level elements */ margin-bottom: 10px; /* Separate buttons onto different lines */ } .button:active, .button:focus-visible { transform: translateY(16px); box-shadow: none; }
I've identified the error in your CSS code. It appears that you're using the "align" property incorrectly. Instead of "align," you should use the "text-align" property for aligning text content within elements like the buttons and the "float" property for positioning elements within their container.
Here's a quick recap of the key modifications made:
1. HTML Structure: We wrapped the "Love" and "Hate" buttons within a `<div>` element with the class "sidebar" in both the `index.html` and `summerschool.html` files. This `<div>` serves as the container for the sidebar content.
2. CSS Styling: In the CSS (`style.css`), we defined styling rules for the "sidebar" class. These rules position the sidebar on the left side of the screen, make it full-height, and stack the buttons vertically within the sidebar. This gives the appearance of a dedicated sidebar for the buttons.
With these improvements, your web page is now better equipped to engage and serve its users effectively.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 1 images