2 replies [Last post]
fhxfhx
fhxfhx's picture
Offline
newbie
Last seen: 7 years 26 weeks ago
Timezone: GMT+1
Joined: 2010-05-30
Posts: 5
Points: 9

Hi,
i wanted to align the LI sign at the top. I'm not meaning the content within the li tags, i mean the li sign itself (the bullet or number).

Pls share.

regards,
Frank

bron
bron's picture
Offline
newbie
Last seen: 7 years 24 weeks ago
Timezone: GMT+2
Joined: 2013-09-17
Posts: 4
Points: 4

Probably it is not

Probably it is not allowed...

<ul>
<li><p>Some text</p></li>
  <img href="" alt="" />
<li><p>Some text</p></li>
  <img href="" alt="" />
<li><p>Some text</p></li>
  <img href="" alt="" />
</ul>
 
html,body,ul,li,p,img { /*simple reset*/
  margin: 0; padding: 0; border: 0;
  font: normal 100% sans-serif; font-family: inherit;
}
ul {
  margin-left: 50px;
  list-style: decimal;
}
li {
  line-height: 1em;
  margin-top: 10px;
}
p {
  line-height: 1em;
}
img {
  width: 200px;
  height: 200px;
  margin-top: 10px;
}

helldog2004
helldog2004's picture
Offline
Enthusiast
Netherlands
Last seen: 5 years 7 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2014-03-02
Posts: 205
Points: 239

Yes it is indeed impossible

Yes it is indeed impossible without adding text inside the li.
In order to get things working you should create something like this:

<ul>
<li><p><a href="http://en.wikipedia.org/wiki/Carl_Joachim_Friedrich">Joachim Friedrich</a> 1598-1608.</p></li>
  <img src="http://www.mythosb.de/tl_files/mythos/cont/regent/hozo/8_Joachim_Friedrich_B.jpg" alt="Joachim Friedrich" height="260" width="200" />
</ul>

You can see it working here.

Check Maximum Webdesign for your online solutions