Sunday, 15 March 2015

javascript - Center image returned by instafeed.js -


I'm using to create a live live instagram. Everything is fine, but I want to focus on the image returned by instafeed. I have tried to use many different methods, but it does not behave as expected.

My HTML code:

  & lt ;! DOCTYPE html & gt; & Lt; Top & gt; & Lt; Title & gt; Scenekvelder & lt; / Title & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "style.css" & gt; & Lt; Script type = "text / javascript" src = "/ instafeed.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var feed = new Instafeed ({get: "tagged", tagName: "de3musketereroslo", clientId: "d07f4ce08c6d4251b9fbb813d1fae305", resolution: "standard_resolution", range: 1, sortBy: "most recent"}); Feed.run (); SetInterval (function () {location.reload ()}, 10000); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; LiveFeed Fra Instagram # D3 MateratorOSlo & lt; / H1> & Lt; Main & gt; & Lt; Div id = "wrapper" class = "center" & gt; & Lt; Div id = "insta-wrap" & gt; & Lt; Div id = "instafeed" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Home & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

  body {background: # 000000; } H1 {color: #FFFFFF; Text align: center; Padding-top: 2 cm; }. Center {align-items: center; According to the code,  

Alignment "works only in flexible elements, and I think CSS has posted this actual real CSS by you. So, do this

 . Center {display: -webkit-flex; / * Safari * / -webkit-alignment-item: center; / * Safari 7.0+ * / Display: Flex; Alignment-item: center; }  

Depending on how your rest layout works, and if the instagram feed simply gives you the IgG tag, then you probably want to:

 . Center IMG {Display: Block; Margin-left: auto; Margin-right: auto; }  

No comments:

Post a Comment