Copy link to clipboard
Copied
I am having some problems with UL lists. I figured out how to code specific UL classes. The problem is, if the the line item is more than one line, the text floats to the left. Is there a way to align the text with the first line of the <li>?
Here is my class:
Attached is what I'm getting:
Copy link to clipboard
Copied
Use CSS list-style-position
(inside or outside).
https://www.w3schools.com/css/css_list.asp
Copy link to clipboard
Copied
I added. list-style-position: outside; to the code, but there was no change.
Copy link to clipboard
Copied
What does your actual code look like as I can't see anything in the css that you posted that would be causing the issue?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Using this CSS
/*Mobile*/
body {
margin: 20px;
}
ul.specifications-info {
list-style-type: none;
padding: 0;
font-size: 1.5em;
font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", serif;
}
/*Tablet*/
@media (min-width:381px) {
ul.specifications-info {
font-size: 1.4em;
}
}
/*Desktop*/
@media (min-width: 950px){
ul.specifications-info {
font-size: 1.3em;
}
}
I get
Copy link to clipboard
Copied
Thanks, I will give that a shot. I wonder which attribute made the difference? Perhaps I had too many attributes.
Copy link to clipboard
Copied
Isn't this what definition lists <dl> are intended for?