Styling issue with list items (from wiki API project)

Styling issue with list items (from wiki API project)
0

#1

So I got the hard part of the wikipedia API project out of the way, but just having some styling issues in my search results.

When you search something, sometimes the search heading and the search text description are not formatted properly.

The picture shows what I’m describing.

Here’s a link to my codepen: http://codepen.io/drhectapus/full/QdBzOo/

Any help greatly appreciated!


#2

this in your html Line 15

<ul class="list-group" id="output">

needs to be formatted correctly in your Js Line 20

$("#output").prepend("<li class='list-group-item'><a href="+data[3][i]+">"+data[1][i]+"</a><p>"+data[2][i]+"</p></li>");

#3

Am I missing something? That’s the same code that I already have !


#4

I know that’s your code - I’m not fixing it for you silly … I pointed out that YOU need to format your javscript html tags to what layout YOU want … :wink:


#5

Ah I thought my eyes were going crazy for a sec haha.

Well I want it to lay out like

<ul class="list-group">
  <li class="list-group-item"><a href="#">Search title</a><p>Search Description</p></li>
</ul>

Is this the wrong format?