0

I am creating an ordered list of images using uppercase letters instead of numbers. When I insert the image the line letter (A, B, etc) is aligned to the bottom of the image and I would live to move it to the top of the image. Here is an example.

<ol type="A">
  <li><img alt="" height="56" src="prod-dp-cms-api.s3.amazonaws.com/cms/EM_2_EQ_409_fb2217130b.png" width="400" /></li>
</ol>
DCR
  • 14,737
  • 12
  • 52
  • 115
  • Yah I am very very new at coding and am asking for what I'm sure is a basic technique. Here's the code I have but I am unsure of what is needed to move the image or line letter around? Here's what I have, I understand I have no type of alignment or padding code yet.
    – Thomas McNeely Mar 09 '22 at 22:07

2 Answers2

0

It's hard to recommend something without seeing the html layout. Is the letter just a text or is it inside it's own element (usually better approach)?

I like to use flex, this can do what you want when applied to parent container element:

display: flex;
align-items: flex-start;

or simply

 vertical-align: text-top;

There is plenty of other ways, as I said, depends on the layout.

Pavel Horyna
  • 360
  • 1
  • 5
  • 17
0

img{
vertical-align:middle;}
<ol type="A">
  <li><img alt="" height="56" src="prod-dp-cms-api.s3.amazonaws.com/cms/EM_2_EQ_409_fb2217130b.png" width="400" /></li>
</ol>
DCR
  • 14,737
  • 12
  • 52
  • 115