Style embedded Instagram Photos horizontally

主宰稳场 提交于 2019-12-11 13:46:10

问题


I am having a hard time adding a simple style to embedded instagram photos. I wanted the photos side by side so I used an unordered list and styled it so it was not bulleted and listed them horizontally. However, the style just does not seem to be applied to the embedded Instagram photos.

The CSS

#instapost ul
{
list-style-type: none;
}

#instapost ul li { 
display: inline;
}

The HTML

<div id="instapost">
<ul>
    <li>(copy any post from instagram and make max-width=320)</li>
    <li>(copy any post from instagram and make max-width=320)</li>
</ul>
</div>

The full example with embedded Instagram photos can be seen here: https://jsfiddle.net/edwardgam/0k7smgvk/4/

(I am actually using WordPress and a WordPress plugin 'Simple Instagram Embed' so I just copy the URL of the Instagram photo (instead of the Instagram provided embed code) and paste into the appropriate place in my Wordpress post. However, this problem exists whether I use the plugin or not).

Thanks.


回答1:


#instapost ul li { 
    width: 320px;
    float: left;
    margin-right: 10px;
}


来源:https://stackoverflow.com/questions/46247728/style-embedded-instagram-photos-horizontally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!