This question already has answers here:
Second line in li starts under the bullet after CSS-reset
(4 answers)
Li item on two lines. Second line has no margin
(8 answers)
Closed 7 months ago.
The text under the icon starts from far back. I couldn't find a solution as I'm not even beginner on HTML or CSS. If you can help me how to align the text I'd appreciate it.
Here is the HTML code:
A great fit for startups and scaleups:
<ul>
<li>Export data from your <strong>Marketing Data Sources</strong></li>
<li>Export your Marketing data to Google Sheets</li>
<li><strong>Daily refresh</strong> of data</li>
<li>Unlimited data sources</li>
<li>1 user</li>
<li>1 account per data source</li>
</ul>
This is another way.
<html>
<head>
<style>
ul.inside {
max-width: 200px;
list-style-position: outside;
}
</style>
</head>
<body>
<ul class="inside">
<li>Export data from your <strong>Marketing Data Sources</strong></li>
<li>Export your Marketing data to Google Sheets</li>
<li><strong>Daily refresh</strong> of data</li>
<li>Unlimited data sources</li>
<li>1 user</li>
<li>1 account per data source</li>
</ul>
</body>
<html>
You can approach it this way.
ul.inside {
max-width: 200px;
list-style-position: outside;
}
A great fit for startups and scaleups:
<ul class="inside">
<li>Export data from your <strong>Marketing Data Sources</strong></li>
<li>Export your Marketing data to Google Sheets</li>
<li><strong>Daily refresh</strong> of data</li>
<li>Unlimited data sources</li>
<li>1 user</li>
<li>1 account per data source</li>
</ul>
<br>
<br>
<h3>THIS IS ANOTHER WAY</h3>
<ul style="max-width: 200px; list-style-position: outside;">
<li>Export data from your <strong>Marketing Data Sources</strong></li>
<li>Export your Marketing data to Google Sheets</li>
<li><strong>Daily refresh</strong> of data</li>
<li>Unlimited data sources</li>
<li>1 user</li>
<li>1 account per data source</li>
</ul>
I wrote an HTML document with seven anchor links to jump to different section on the page. However, only the first and the last links are working and the rest are not working. I cloned the first section which is working alright and then changed the id to the second section. And that made the second anchor link working. So, I know that somewhere in my second to the second last section is not working. However, I cannot find where is wrong. My code passed the w3.org's validator. Could someone look into my code to see what is the problem. I'm still a beginner so please go easy on me. Thank you.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Jade Ichinose Resume</title>
</head>
<body>
<h1>Jade</h1>
<span id="email">Email:</span>
<span id="phone">Mobile:</span>
My LinkedIn Profile
<section>
<h3>Overview</h3>
<ul>
<!-- Link to every section in the page -->
<li>Personal Summary</li>
<li>Education</li>
<li>Skillset</li>
<li>Working Experience</li>
<li>Voluntary Experience</li>
<li>Hobbies and Interests</li>
<li>Referees</li>
</ul>
</section>
<section id="personal_summary">
<h2>Personal Summary</h2>
<p>
describing myself what I studied experience job, volunteering Career goal -> What I want to achieve for the company using my skills and experience
</p>
</section>
<section id=“education”>
<h2>Education</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) school</li>
<li>major</li>
<li>Achievement — what I did well in the study —
<ul>
<li>computer programming with the result A+
<ul>
<li> languages and field, courses</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id=“skillset”>
<h2>Skillset</h2>
<ul>
<li>Hard skills— languages, maths, software, SublimeText3, Wing, Geany, Spyder</li>
<li>Soft skills, English, Japanese, fundamental level Chinese(mandarin), team-orientated, time management,</li>
</ul>
</section>
<section id=“working_experience”>
<h2>Working Experience</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) company </li>
<li>role, position</li>
<li>Achievement — what I did well in the job —
<ul>
<li>example1
<ul>
<li> detail about example1 may not be required</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id=“voluntary_experiene”>
<h2>Voluntary Experience</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) company or organisation (church)</li>
<li>role, position</li>
<li>Achievement — what I did well in the job —
<ul>
<li>example1
<ul>
<li> detail about example1 may not be required</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id=“hobbies_interests”>
<h2>Hobbies and Interests</h2>
<ul>
<li>Cooking</li>
<li>Minerals and Lapidary</li>
</ul>
</section>
<section id="referees">
<h2>Referees</h2>
<ul>
<li>name of the referee, position, company, contact detail (email or phone number)</li>
<li>referee 2</li>
<li>referee 3</li>
</ul>
</section>
</body>
</html>
Take a close look on your ".
<section id=“education”>
<section id="education">
The first is not working, the second does work. You are using a 'right double quotation mark' (”) and not a 'normal quotation mark' (") in the other sections. The first section personal_summary is fine.
The quotation marks that you have used for id are wrong
Use
<section id="education">
Instead of
<section id=“education”>
Same for all other non-working sections
You made a tiny mistake on the type of quotation mark you used.The first and the last are fine and you've used ".." but on the rest you've made the mistake of using “...”. For example for education, you had it as: section id=“education” Instead of:section id="education"
You've also named an ID as id=“voluntary_experiene” and called it using:href="#voluntary_experience" which has a slight spelling mistake. The code below has all the fixed/working anchor tags.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Jade Ichinose Resume</title>
</head>
<body>
<h1>Jade</h1>
<span id="email">Email:</span>
<span id="phone">Mobile:</span>
My LinkedIn Profile
<section>
<h3>Overview</h3>
<ul>
<!-- Link to every section in the page -->
<li>Personal Summary</li>
<li>Education</li>
<li>Skillset</li>
<li>Working Experience</li>
<li>Voluntary Experience</li>
<li>Hobbies and Interests</li>
<li>Referees</li>
</ul>
</section>
<section id="personal_summary">
<h2>Personal Summary</h2>
<p>
describing myself
what I studied
experience job, volunteering
Career goal -> What I want to achieve for the company using my skills and experience
</p>
</section>
<section id="education">
<h2>Education</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) school</li>
<li>major</li>
<li>Achievement — what I did well in the study —
<ul>
<li>computer programming with the result A+
<ul>
<li> languages and field, courses</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id="skillset">
<h2>Skillset</h2>
<ul>
<li>Hard skills— languages, maths, software, SublimeText3, Wing, Geany, Spyder</li>
<li>Soft skills, English, Japanese, fundamental level Chinese(mandarin), team-orientated, time management,</li>
</ul>
</section>
<section id="working_experience">
<h2>Working Experience</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) company </li>
<li>role, position</li>
<li>Achievement — what I did well in the job —
<ul>
<li>example1
<ul>
<li> detail about example1 may not be required</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id="voluntary_experience">
<h2>Voluntary Experience</h2>
<ul>
<li>date (start mmm/yy - completed mmm/yy) company or organisation (church)</li>
<li>role, position</li>
<li>Achievement — what I did well in the job —
<ul>
<li>example1
<ul>
<li> detail about example1 may not be required</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id="hobbies_interests">
<h2>Hobbies and Interests</h2>
<ul>
<li>Cooking</li>
<li>Minerals and Lapidary</li>
</ul>
</section>
<section id="referees">
<h2>Referees</h2>
<ul>
<li>name of the referee, position, company, contact detail (email or phone number)</li>
<li>referee 2</li>
<li>referee 3</li>
</ul>
</section>
</body>
</html>
i tried to validate a .html file and received this error-
Error: Element ul not allowed as child of element ol in this context
<ol>
<li><span class="bold">Preheat Oven:</span> Preheat oven </li>
<li>To Mak</li>
<ul>
<li>Whisk together </li>
<li>Stir in water,.</li>
<li>Cook over</li>
<li>Stir in butter.</li>
<li>Place egg yolks</li>
<li>Whisk egg yolk . </li>
<li>Bring to a </li>
<li>Remove from heat. </li>
<li>Pour fill.</li>
</ul>
<li><span class="bold">Make Meringue:</span> bowl ...</li>
<ul>
<li> woamy.</li>
<li>Add sugar gradua. </li>
<li> sealing the edges at the crust.</li>
</ul>
<li>brown.</li>
</ol>
I cannot seems to figure out what I did wrong. Any suggestions?
You need to wrap the unordered list in list item tags, otherwise they are just floating around in the middle of no where:
<ol>
<li><span class="bold">Preheat Oven:</span> Preheat oven </li>
<li>To Mak</li>
<li>
<ul>
<li>Whisk together </li>
<li>Stir in water,.</li>
<li>Cook over</li>
<li>Stir in butter.</li>
<li>Place egg yolks</li>
<li>Whisk egg yolk . </li>
<li>Bring to a </li>
<li>Remove from heat. </li>
<li>Pour fill.</li>
</ul>
</li>
<li><span class="bold">Make Meringue:</span> bowl ...</li>
<li>
<ul>
<li> woamy.</li>
<li>Add sugar gradua. </li>
<li> sealing the edges at the crust.</li>
</ul>
</li>
<li>brown.</li>
</ol>
https://stackoverflow.com/a/15870503/8179067 i think the answer can be founded in this topic :)
"
This is because the content model for (and actually) is zero or more li elements
These two tags actually can't contain anything other than tags or nothing at all. If you have browsers will automatically close the tag before beginning the (well, the good ones).
try with this one :)
I have a problem with the HTML and the CSS, where I nested the Salads, Fresh and the Smoothies in Recipes. But hover last one to show and choose to click over them (to choose specific salad or fresh etc.), they have been fleeing me (they show, but I can't click on them), so I can't open the hyperlinks which they contain.
This is the HTML code:
<div id="nav">
<ul class="nav-list">
<li>Home</li>
<li>
Tips for health
<ul class="sub-nav-list">
<li>The healing properties</li>
<li><a href="5%20vajni%20podpravki.html"5 important spices that you should include in your diet</a></li>
<li>Bad habits and their removal</li>
<li>Water as a source of life</li>
</ul>
</li>
<li>
Recipes
<ul class="sub-nav-list">
<li>Salads</li>
</ul>
<ul class="sub-sub-nav-list">
<li>Lettuce</li>
<li>French salad</li>
<li>Red Beet Salad</li>
</ul>
<ul class="sub-nav-list">
<li>Fresh</li>
</ul>
<ul class="sub-sub-nav-list">
<li>Sweet fresh</li>
<li>Fresh detox</li>
<li>Citruc fresh</li>
</ul>
<ul class="sub-nav-list">
<li>Smoothies</li>
</ul>
<ul class="sub-sub-nav-list">
<li>Chocolate smoothie</li>
<li>Tropical smoothie</li>
<li>Smoothie with banana and pineapple</li>
</ul>
</li>
<li>Contacts</li>
</ul>
</div>
And this is the CSS code:
.sub-nav-list {
display: none;
}
.sub-sub-nav-list {
display: none;
}
ul.nav-list li:hover > ul.sub-nav-list {
display: block;
padding-left: 50px;
}
ul.nav-list li ul.sub-nav-list:hover + ul.sub-sub-nav-list {
display: block;
padding-left: 100px;
}
<li>The healing properties</li>
<li><a href="5%20vajni%20podpravki.html"5 important spices that you should include in your diet</a></li>
it should be
like this
<li>5 important spices that you should include in your diet</li>
right ?
The bottom of my page is supposed to have contact information below the bottom navigation bar. For some reason I cannot get this to happen. The contact info goes up above the bottom navigation even though the code has it below.
<footer>
<ul id="nav">
<li>Home
</li>
<li>Bio
</li>
<li>Career
</li>
<li>Links
</li>
<li>Contact
</li>
<li>Hobbies
</li>
</ul>
<br />
<div id="contactinfo">Twin Artesian Stables
<br />2990 Oakdale Dr.,
<br />Suamico, WI
<br />920-865-5555
</div>
</footer>
Make sure if there is positions set in your css for #nav #contactinfo -> has to be
#nav #contactinfo{position:relative}...