Reputation: 5734
Check this out, the bullets are on the picture:
Picture css:
img[src="img/tecnicos.jpg"] {
max-width: 300px;
max-height: 300px;
float: left;
margin-right: 2em;
}
Bullet list css:
#contenido ul {
max-width: 75ch;
margin: auto;
font-family: 'Work Sans';
text-align: left;
line-height: 1.5em;
font-size: 0.9em;
list-style: disc;
}
HTML:
<h2>BLa</h2>
<img src="img/image.jpg" alt=''>
<ul>
<li>Line 1</li>
<li>Line 2</li>
<li>...</li>
</ul>
Li element has no css.
On Chrome and Firefox the bullets are displayed right where it should, next to the text.
Tips?
Upvotes: 0
Views: 38
Reputation: 114
Create a new block formatting context with
ul {
overflow: hidden;
}
Upvotes: 0
Reputation: 201
Adding overflow: hidden
to the list fixes it if you don't need the list to flow around the image: https://jsfiddle.net/jameson5555/95koe4sg/2/
ul {
overflow: hidden;
}
If it does need to wrap, you could add something like this: https://jsfiddle.net/jameson5555/95koe4sg/3/
ul {
overflow: hidden;
display: inline;
list-style-position: inside;
}
Upvotes: 1