问题
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