wiseboss Posted October 13, 2013 Share Posted October 13, 2013 So I've centered 2 images inside a wrapper; and this is what i get... (view image) Link to comment Share on other sites More sharing options...
davej Posted October 13, 2013 Share Posted October 13, 2013 Try... *{margin:0;padding:0;} Link to comment Share on other sites More sharing options...
wiseboss Posted October 13, 2013 Author Share Posted October 13, 2013 Try... *{margin:0;padding:0;} Forgot to mention that I've all ready tried all those "methods" margin 0 and padding 0 don't work either Link to comment Share on other sites More sharing options...
dsonesuk Posted October 13, 2013 Share Posted October 13, 2013 (edited) inline-block has habit of adding space for elements that are stacked <img src="pic1.jpg" alt=""> <img src="pic2.jpg" alt=""> it treats the newline/linebreak that make the elements stack as a space, which same size as font used for that element. fixes include not stacking <img src="pic1.jpg" alt=""><img src="pic2.jpg" alt=""> setting font-size:0; or floating the elements. Edit: one more thing id reference MUST be unique within the page. Edited October 13, 2013 by dsonesuk Link to comment Share on other sites More sharing options...
wiseboss Posted October 13, 2013 Author Share Posted October 13, 2013 (edited) inline-block has habit of adding space for elements that are stacked <img src="pic1.jpg" alt=""> <img src="pic2.jpg" alt=""> it treats the newline/linebreak that make the elements stack as a space, which same size as font used for that element. fixes include not stacking <img src="pic1.jpg" alt=""><img src="pic2.jpg" alt=""> setting font-size:0; or floating the elements. Edit: one more thing id reference MUST be unique within the page. Thanks!!! worked out fine. used the 0 font size on the parent div Edited October 13, 2013 by wiseboss Link to comment Share on other sites More sharing options...
lovewebdesign Posted October 24, 2013 Share Posted October 24, 2013 What a weirdo... Learn a lot from this problem... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now