How to narrow text in CSS? - html

I'm a beginner in HTML&CSS and now I'm coding my first project. But I'm kind of struggling with narrowing unordered lists. I attached photos that show how it must look like and how it actually looks like. If you can help me, I would be really happy.
How it must look like:
#tribute-info {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#tribute-description {
font-size: 18px;
}
li {
font-size: 16px;
}
<div id="tribute-info">
<h3 id="tribute-description">
Here's a time line of Dr. Borlaug's life:
</h3>
<ul>
<li><strong>1914</strong> - Born in Cresco, Iowa</li>
<li>
<strong>1933</strong> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"
</li>
<li>
<strong>1935</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."
</li>
<li>
<strong>1937</strong> - Finishes university and takes a job in the US Forestry Service
</li>
<li>
<strong>1938</strong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.
</li>
<li>
<strong>1941</strong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.
</li>
<li>
<strong>1942</strong> - Receives a Ph.D. in Genetics and Plant Pathology
</li>
<li>
<strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent
wheat - including different varieties for each major climate on Earth.
</li>
<li>
<strong>1945</strong> - Discovers a way to grown wheat twice each season, doubling wheat yields
</li>
<li>
<strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.
</li>
<li>
<strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population
</li>
<li><strong>1970</strong> - receives the Nobel Peace Prize</li>
<li>
<strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields
</li>
<li>
<strong>1984</strong> - becomes a distinguished professor at Texas A&M University
</li>
<li>
<strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous
because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."
</li>
<li><strong>2009</strong> - dies at the age of 95.</li>
</ul>
</div>

You can wrap your <ul> in a <div> and center it like this:
.list {
max-width: 700px;
margin: 0 auto;
}
.list li {
margin-bottom: 1em;
}
<div class="list">
<ul>
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
</ul>
</div>

Just add a CSS rule that limits the width of that ul. You can either use a class or ID on the ul for that or use a child selector like this:
#tribute-info > ul {
max-width: 400px;
}
(This applies to any ul which is a direct child ot the #tribute-info element - in your case only one, i.e. that list)
#tribute-info {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#tribute-description {
font-size: 18px;
}
li {
font-size: 16px;
}
#tribute-info > ul {
max-width: 400px;
}
<div id="tribute-info">
<h3 id="tribute-description">
Here's a time line of Dr. Borlaug's life:
</h3>
<ul>
<li><strong>1914</strong> - Born in Cresco, Iowa</li>
<li>
<strong>1933</strong> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"
</li>
<li>
<strong>1935</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."
</li>
<li>
<strong>1937</strong> - Finishes university and takes a job in the US Forestry Service
</li>
<li>
<strong>1938</strong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.
</li>
<li>
<strong>1941</strong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.
</li>
<li>
<strong>1942</strong> - Receives a Ph.D. in Genetics and Plant Pathology
</li>
<li>
<strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent
wheat - including different varieties for each major climate on Earth.
</li>
<li>
<strong>1945</strong> - Discovers a way to grown wheat twice each season, doubling wheat yields
</li>
<li>
<strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.
</li>
<li>
<strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population
</li>
<li><strong>1970</strong> - receives the Nobel Peace Prize</li>
<li>
<strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields
</li>
<li>
<strong>1984</strong> - becomes a distinguished professor at Texas A&M University
</li>
<li>
<strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous
because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."
</li>
<li><strong>2009</strong> - dies at the age of 95.</li>
</ul>
</div>

Michael, answer by Lee Taylor is a nice one, in case you do not want a div element wrapping the list you can directly apply the "list" class to the element:
<ul class="list">
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
<li>Your list here</li>
</ul>
As well you must be sure that the unordered list is wrapped inside a container wider in size than element.

Related

Why does bottom h3 title become indented?

I add two titles: "Education" & "My Hobbies"
Why are they not aligned?
I have went thru the code and managed to fix some nesting list issues but that did not fix above problem.
<body>
<h1>Vlad Myshchuk</h1>
<p><em><strong>Software Engineer</strong><br>Full Stack Developer</em></p>
<p>I am self-taught student of programming. My focus as a Software Engineer is primarily on Full Stack Software & Web Development. I hold a degree in Accounting A.A.S. as well as Computer Information Systems A.A.S.</p>
<hr>
<h3>Education</h3>
<ul>
<li>Hudson Valley Community College</li>
<li>State University of New York College at Oneonta</li>
<li>Recent courses at Udemy:
<ul>
<li>The Complete 2019 Web Development Bootcamp with Professor Angela Yu</li>
</ul>
</li>
<li>Books
<ul>
<li>Pragmatic Thinking and Learning by Andy Hunt</li>
<li>Code: The Hidden Language of Computer Hardware and Software by Charles Petzold</li>
<li>Code Complete: A Practical Handbook of Software Construction by Steve McConell</li>
<li>Clean Code: A Handbook of Agile Software Cragsmanship by Robert C. Martin</li>
</ul>
</li>
<h3>My Hobbies</h3>
<ol>
<li>Completing algorithms on codechef.com and codingame.com</li>
<li>Practice a variety of meditation and yoga.</li>
<li>Weight training and high intensity interval training (HIIT).</li>
<li>Reading books on psychology as well as philosophy.</li>
<li>Listening to educational podcasts and recorded lectures.</li>
</ol>
</body>
I expect both headers to be positioned to the very left.
You did a silly mistake dear. You have to just complete
</ul>
tag before
<h3>My Hobbies</h3>
after correct it your problem will be solve.
Just a typo i expect, there was an unescaped h3 tag. There's a handy tool you can use to check: https://www.aliciaramirez.com/closing-tags-checker/
<body>
<h1>Vlad Myshchuk</h1>
<p><em><strong>Software Engineer</strong><br>Full Stack Developer</em></p>
<p>I am self-taught student of programming. My focus as a Software Engineer is primarily on Full Stack Software & Web Development. I hold a degree in Accounting A.A.S. as well as Computer Information Systems A.A.S.</p>
<hr>
<h3>Education</h3>
<ul>
<li>Hudson Valley Community College</li>
<li>State University of New York College at Oneonta</li>
<li>Recent courses at Udemy:
<ul>
<li>The Complete 2019 Web Development Bootcamp with Professor Angela Yu</li>
</ul>
</li>
<li>Books
<ul>
<li>Pragmatic Thinking and Learning by Andy Hunt</li>
<li>Code: The Hidden Language of Computer Hardware and Software by Charles Petzold</li>
<li>Code Complete: A Practical Handbook of Software Construction by Steve McConell</li>
<li>Clean Code: A Handbook of Agile Software Cragsmanship by Robert C. Martin</li>
</ul>
</li>
</ul>
<h3>My Hobbies</h3>
<ol>
<li>Completing algorithms on codechef.com and codingame.com</li>
<li>Practice a variety of meditation and yoga.</li>
<li>Weight training and high intensity interval training (HIIT).</li>
<li>Reading books on psychology as well as philosophy.</li>
<li>Listening to educational podcasts and recorded lectures.</li>
</ol>
</body>

How to stop auto line-breaks and centralize the lines the way I want them to be?

How to make
look like
All I want to do is put the line-breaks in the correct place as it is in the second image. I also tried to use display options, as well as text-align... Maybe I am doing it the wrong way. I would be greatful if you guys could help.
<html>
<head>
<title>Tribute page</title>
<style type="text/css">
html,body{
font-family:"Trebuchet MS", Helvetica, sans-serif;
text-align:center;
min-width:260px;
color:#333;
}
#main{
margin:30px auto;
padding:15px;
border:0px solid;
border-radius:5px;
background:#eee;
}
#image{
max-width: 100%;
display: block;
height: auto;
margin: auto;
}
#img-div{
margin:-5px;
margin-top:20px;
width:100%;
border:5px solid white;
background:white;
}
#img-caption{
margin:15px;
}
#headline{
margin-top:50px;
text-align:left;
}
ul{
max-width:550px;
margin: 0 auto;
text-align:left;
}
li{
margin: 10px;
}
h3{
}
blockquote{
font-style: italic;
}
</style>
</head>
<body>
<div id="main">
<h1 id="title">Dr Norman Borlaug</h1>
<div>The man who saved a billion lives</div>
<div id="img-div">
<img src="C:\Users\User\Desktop\Freecodecamp\Tributepage\norman.jpg" id="image">
<div id="img-caption">Dr. Norman Borlaug, second from left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.</div>
</div>
<div id="tribute-info">
<ul>
<h3 id="headline">Here's a time line of Dr. Borlaug's life:</h3>
<li><strong>1914</strong> - Born in Cresco, Iowa</li>
<li><strong>1933</strong> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"</li>
<li><strong>1935</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."</li>
<li><strong>1937</strong> - Finishes university and takes a job in the US Forestry Service</li>
<li><strong>1938</strong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.</li>
<li><strong>1941</strong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disenfectants, and other applied science.</li>
<li><strong>1942</strong> - Receives a Ph.D. in Genetics and Plant Pathology</li>
<li><strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent
wheat - including different varieties for each major climate on Earth.</li>
<li><strong>1945</strong> - Discovers a way to grown wheat twice each season, doubling wheat yields</li>
<li><strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertalizer. It goes on to provide 95% of Mexico's wheat.</li>
<li><strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</li>
<li><strong>1970</strong> - receives the Nobel Peace Prize</li>
<li><strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields</li>
<li><strong>1984</strong> - becomes a distinguished professor at Texas A&M University</li>
<li><strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous
because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."</li>
<li><strong>2009</strong> - dies at the age of 95.</li><br><br>
<blockquote>
<p>"Borlaug's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and
scientific vision can make to human peace and progress."</p>
<div>-- Indian Prime Minister Manmohan Singh</div>
</blockquote>
<h3>If you have time, you should read more about this incredible human being on his Wikipedia entry.</h3>
</ul>
</div>
</div>
</body>
</html>
You are close :)
If you pull the <blockquote> and the <h3> out of the <ul> and insert after the </div>beneath it, you would have your result the way you want it.
Like this:
</ul>
</div>
<blockquote>
<p>"Borlaug's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and
scientific vision can make to human peace and progress."</p>
<div>-- Indian Prime Minister Manmohan Singh</div>
</blockquote>
<h3>If you have time, you should read more about this incredible human being on his Wikipedia entry.</h3>
</div>
</body>
</html>
There are some other "rule of thumb" things wrong with your code, but like you said you are new, and I won't bother you with it :)
Welcome, and hope you like coding.
EDIT: Also, if you would like the line to break the exact same places as in your example, you can make a <div>around the two elements (the blockquote and the h3) and set a width on the div with CSS or add padding to the div, so that it would match exactly.
It looks like you just need to add a width or max-width to the elements attribute (in this case the <p> and <div> inside <blockquote>. Then you can use margin to center the element.
blockquote p {
width: 600px; //this could be a percent or max-width
margin: 0 auto; //margin top/bottom & margin left/right
}
One thing to note, the exact location of line breaks will vary between monitors, browsers, and devices as the "size" of the font will vary a bit. You can either fight that and try to be super exact or you can embrace the fluid nature of the web.

How to flatten the text in the article (css and html)?

I want to ask something that related about CSS and HTML.
I have a travel blog and I want to add new like a related post on Time.com on my article post, but I have a problem.
What do I need?
A new section like a related post on Time.
Screenshot: Time.com.
My problem: The text can't flatten the content.
How can I make that text/article like Time.com?
Thanks
My HTML code:
<div class="resources">
<h4>Other facts</h4>
<ul>
<li>United Arab Emirates Facts</li>
<li>Venice Facts</li>
<li>Great Wall of China Facts</li>
<li>Dead Sea Facts</li>
<li>Grand Canyon Facts</li>
</ul>
</div>
My CSS:
.resources }
width: 30%;
float: left;
}
What you would need is add float to the image, so that the text nicely wraps around your image. i think that answers your question.
it's work for <p> like this:
.resources > ul {
width: 30%;
float: left;
margin-left: -30px;
}
.resources p {
margin-top: -30px;
}
.resources h4 {
margin-bottom: -5px;`
}
<h2 style="text-align: center;">30 Fun and Interesting Facts about Germany</h2>
<div class="resources">
<h4>Other facts</h4>
<ul>
<li>United Arab Emirates Facts</li>
<li>Venice Facts</li>
<li>Great Wall of China Facts</li>
<li>Dead Sea Facts</li>
<li>Grand Canyon Facts</li>
</ul>
<p><strong>Interesting Facts about Germany</strong> - Interested in spending some time in Germany during for your vacation? Well, it’s a good idea for you to know about some facts about Germany as mentioned below.</p>
<p>Those facts can be helpful for you to understand this country better and thus, you can enjoy your vacation more. So, here they are 30 interesting and fun facts about Germany.</p>
</div>
<ol>
<li><p><strong>The Second Beer Consumer in the Europe</strong> - With the love of drinking beer, (to be honest, Germany is known as the Europe’s second beer consumer), it’s legal to drink anywhere you want. The laws regarding boozing are always loose. It’s even possible for teenagers to buy and drink alcohol freely by the age of 14! The first beer consumer in the EU is Ireland. What cool facts about Germany.</p></li>
<li><p><strong>College Education Is Free for Everyone!</strong> - Good news for you who want to go to Germany to college and studies in Germany. It’s among the facts about Germany that college education is free even for non-Germans. The government thinks that it’s entirely unjust to ask for tuitions from the students of higher education. So, do you have more urge to get a scholarship there and studies in Germany?</p></li>
But, if the element contains the other <ol> and <li>, that should not work.
And how about if I used the HTML element like this?
<p><strong>Interesting Facts about Germany</strong> - Interested in spending some time in Germany during for your vacation? Well, it’s a good idea for you to know about some facts about Germany as mentioned below.</p>
<p>Those facts can be helpful for you to understand this country better and thus, you can enjoy your vacation more. So, here they are 30 interesting and fun facts about Germany.</p>
<div class="resources">
<h4>Other facts</h4>
<ul>
<li>United Arab Emirates Facts</li>
<li>Venice Facts</li>
<li>Great Wall of China Facts</li>
<li>Dead Sea Facts</li>
<li>Grand Canyon Facts</li>
</ul>
</div>
<ol>
<li><p><strong>The Second Beer Consumer in the Europe</strong> - With the love of drinking beer, (to be honest, Germany is known as the Europe’s second beer consumer), it’s legal to drink anywhere you want. The laws regarding boozing are always loose. It’s even possible for teenagers to buy and drink alcohol freely by the age of 14! The first beer consumer in the EU is Ireland. What cool facts about Germany.</p></li>
<li><p><strong>College Education Is Free for Everyone!</strong> - Good news for you who want to go to Germany to college and studies in Germany. It’s among the facts about Germany that college education is free even for non-Germans. The government thinks that it’s entirely unjust to ask for tuitions from the students of higher education. So, do you have more urge to get a scholarship there and studies in Germany?</p></li>
Did you try to give the ul the class .resources?
<div class="resources">
<h4>Other facts</h4>
<ul class ="resources">
<li>United Arab Emirates Facts</li>
<li>Venice Facts</li>
<li>Great Wall of China Facts</li>
<li>Dead Sea Facts</li>
<li>Grand Canyon Facts</li>
</ul>
</div>

Is there any simpler way to make the few first letters in a list bold in HTML?

1953 - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertalizer. It goes on to provide 95% of Mexico's wheat.
1962 - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population
1970 - receives the Nobel Peace Prize
1983 - helps seven African countries dramatically increase their maize and sorghum yields
1984 - becomes a distinguished professor at Texas A&M University
Like the above example, I would like to make an unordered list, and each time I should make the year number bold. Is there any way that I can do this at one time instead of make them bold every time I type each line?
The key idea is to use CSS to style the element wrapping the year once, in one place, no matter how many of those list items you have. It still requires some extra markup for each and every year, of course. I'll show you two examples.
Using ol
You could use a ol (ordered list, because it seems you have chronologically ordered data) with the years wrapped in spans, like this:
.chrono {
list-style: none;
padding: 0;
}
.chrono .year {
font-weight: bold;
}
.chrono .year::after {
content: " -";
}
<ol class="chrono">
<li><span class="year">1953</span> crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertalizer. It goes on to provide 95% of Mexico's wheat.
</li>
<li><span class="year">1962</span> Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population
</li>
<li><span class="year">1970</span> receives the Nobel Peace Prize
</li>
<li><span class="year">1983</span> helps seven African countries dramatically increase their maize and sorghum yields
</li>
<li><span class="year">1984</span> becomes a distinguished professor at Texas A&M University
</ol>
Hint: you can reduce the markup by removing the class="year" on each span element. You would then address them as .chrono li span via CSS.
Using dl
Alternatively, you could use a dl (description list, as you describe details regarding a given year), maybe like so:
.chrono {
list-style: none;
padding: 0;
}
.chrono dt {
font-weight: bold;
display: inline;
}
.chrono dd {
display: inline;
margin: 0;
}
.chrono dd::after {
content: "\A";
white-space: pre;
}
.chrono dt::after {
content: " -";
}
<dl class="chrono">
<dt>1953</dt>
<dd>crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertalizer. It goes on to provide 95% of Mexico's wheat.</dd>
<dt>1962</dt>
<dd>Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</dd>
<dt>1970</dt>
<dd>receives the Nobel Peace Prize</dd>
<dt>1983</dt>
<dd>helps seven African countries dramatically increase their maize and sorghum yields</dd>
<dt>1984</dt>
<dd>becomes a distinguished professor at Texas A&M University</dd>
</dl>
Note: here, I'm using this technique to force the desired inline-appearance of the dt and dd elements.
It's not possible in CSS. It will be done using JavaScript (e.g. explode function). The simplest is to tag a word in HTML markup...

Header <h2> floating to be below the next UL list

I have a multiple unordered lists, with a h2 titling each list by subject.
Here is the html
<h2>Early Childhood Education</h2>
<ul class="course-list">
<li>Child Growth and Development</li>
<li>Curriculum and Methods in Teaching Early Childhood Education</li>
<li>Introduction to Early Childhood Education</li>
<li>Introduction to Education</li>
<li>Practicum I: Early Childhood</li>
<li>Practicum II: Early Childhood</li>
<li>Practicum in Education</li>
</ul>
<h2>Emergency Medical Technician</h2>
<ul class="course-list">
<li>Emergency Medical Technician (EMT) – Basic</li>
<li>Emergency Medical Technician (EMT) – Paramedic I</li>
<li>Emergency Medical Technician (EMT) – Paramedic II (Field Internship – Part I)</li>
<li>Emergency Medical Technician (EMT) – Paramedic III</li>
<li>Emergency Medical Technician (EMT) – Paramedic IV (Field Internship – Part II)</li>
<li>EMT-Basic Fieldwork</li>
<li>Report Writing for Healthcare Professionals</li>
</ul>
<h2>English</h2>
<ul class="course-list">
<li>African American Literature</li>
<li>Basic Acting Technique</li>
<li>Contemporary American Poetry</li>
<li>English I: College Writing</li>
<li>English II: Introduction to Literature</li>
<li>Essentials of English *</li>
<li>Interpersonal Communication</li>
<li>Interviewing Practices and Principles</li>
<li>Introduction to Drama Study</li>
<li>Introduction to Poetry</li>
<li>Introduction to Technical Writing</li>
<li>Journalism</li>
<li>Journalism II</li>
<li>Literature for Children</li>
<li>Literature of the Western World</li>
<li>Major American Writers</li>
<li>Major English Writers</li>
<li>Modern American Novel</li>
<li>Nonfiction Literature</li>
<li>Public Speaking</li>
<li>Science Fiction</li>
<li>Service Learning – Volunteer Project</li>
<li>Shakespeare</li>
<li>Storytelling</li>
<li>The Short Story</li>
<li>Voice and Diction</li>
<li>Western Mythology</li>
<li>Women in Literature</li>
<li>Writing Workshop I</li>
</ul>
Here is the CSS
.col-middle .course-list li {
width:50%;
float:left;
}
Here is a screen shot of what it looks like: http://i40.tinypic.com/2141nd3.png
The problem you see in the screen shot is the text within the h2 tags is floating up a line if there is some space after the list above it.
I fixed that by setting overflow:auto; within the ul style, but that made the left half of the list discs dissapear (as you see here: http://i39.tinypic.com/2i8y62r.png)
Also, I'd like to create some spacing between the bottom of the ul list, and the h2 header.
You might wrap each h2/ul pair in a div. This is even good for semantics, since the two are related and therefore could be said to be part of a logical division. Then you can float the whole div and keep the elements grouped.
Please try this tutorial for multi column lists
By the way, floats are evil. ;)
Are the h2 tags supposed to be above each unordered list?
Perhaps what you should do is add a clear:both to the h2 definition...
h2 { clear: both; }