Can someone please help me with my CSS code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone please help me with my CSS code?

Can someone please help to check my code? the CSS does not show on my HTML side when I run it. I just need to know what is wrong, what I did that's wrong. Please help

8th May 2024, 10:09 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
14 Answers
+ 3
Hey Lizby Oosthuizen , it would be really helpful if you could share your code using the code playground. I've already done that for you, but it's better if you have it ready when you have questions about code. I have formated your CSS, that automatically solved the problem you were having with “center”. Formatting your code makes it easier to see where other issues are. Have a look. https://sololearn.com/compiler-playground/W9jbCPeOJ93d/?ref=app
10th May 2024, 11:07 PM
Chris Coder
Chris Coder - avatar
+ 1
Fabian Roy I guess you got a mistake <link rel="stylesheet" href="styles.css">
9th May 2024, 4:09 AM
Mohammed Nihal
Mohammed Nihal - avatar
+ 1
Do you know how to access the code playground?
10th May 2024, 7:19 AM
Chris Coder
Chris Coder - avatar
0
double check the url of css file provided...
8th May 2024, 11:57 AM
Mohammed Nihal
Mohammed Nihal - avatar
0
You didn't provide the code. Btw please check if the <link src="style.css"> line exists in the header section of the HTML file or not.
8th May 2024, 10:00 PM
Fabian Roy
Fabian Roy - avatar
0
I will post my code here. Its on the learning platform
9th May 2024, 4:10 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
0
header {   text-align: center;   background-color: #eeeeee;   padding-top: 2px;   padding-bottom: 2px; h1 {text-transform:uppercase; color:red;} #position {font-size:18px; text-align:center; font-weight:800;} .summary {font-size:16px; line-height:20px;center;} h2 {font-size:20px; color:#2F5A78; padding-bottom: 2px; border-bottom: 1px solid ;} copywrite {text-align:center;} section, footer {padding: 2px 10px; background-color:#eeeeee;} ul {margin: 1px solid #F5SA78;} li b {   color: #2F5A78; } li {   margin-bottom: 5px; } footer a {color: #e99f4b; text-decoration: none} footer a:hover { text-decoration:underline;} table {   border-collapse: collapse; } td, th {   border:1px solid #000000;   padding: 5px; } th {   background-color: #2F5A78;   color: #FFFFFF; }
9th May 2024, 4:15 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
0
Its picks up and changes the style up until summary. Then nothing happens after that
9th May 2024, 4:16 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
0
<!DOCTYPE html> <html>     <body>         <header>         <h1>Lizby Oosthuizen</h1>         <p id="position">Software Engineer</p>         </header>         <section>         <h2>Summary</h2>         <p class="summary"><img src="https://cdn2.iconfinder.com/data/icons/avatars-99/62/avatar-370-456322-512.png" width="80px" alt="">         Deadline-oriented software engineer with lots of experience. Solid track record of architecting solutions that exceed client expectations.</p>         </section>         <section>         <h2>Experience</h2>         <ul id="experience">             <li>                 <b>Senior Software Engineer - Google</b> | 2018 - Present             </li>             <li>                 <b> Software Engineer - Facebook</b> | 2016 - 2018             </li>         </ul>         </section>         <section>         <h2>Skills</h2>         <table id="skills">             <tr><th>Skill</th><th>Level</th></tr>             <tr><td>HTML</td><td>Expert</td></tr>             <tr><td>CSS</td><td>In
9th May 2024, 4:17 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
0
How to save a html css js file
10th May 2024, 5:53 AM
Pallanti Krishna raju
Pallanti Krishna raju - avatar
0
.summary {font-size:16px; line-height:20px;center;} What's center? Did you miss text-align? Maybe it's "text-align: center" And also I think you miss the closing curly brace for header styling.
10th May 2024, 8:23 AM
Wit
Wit - avatar
0
Probably I'll fix that. Thank you so much
10th May 2024, 8:24 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar
0
You're correct! "center" in CSS typically refers to the alignment of content horizontally within an element. To align text in the center horizontally, the correct CSS property is indeed "text-align: center".
10th May 2024, 8:24 AM
Stredy
Stredy - avatar
0
Thank you so much. I didn't know I can share it with the playground...
13th May 2024, 6:39 AM
Lizby Oosthuizen
Lizby Oosthuizen - avatar