html - Correct CSS to replace img align element -
in footer of page http://www.imbued.co.uk/ getting errors on w3c compliance test, understandably, i've used align attribute inline vertically align social media icons corresponding text. correct css alternative use? if remove align attribute text , image aren't both in centre , there no centred float obviously.
there's few options. best set style on elements use margin: auto;
margin-left: 50%; margin-right: 50%; margin: auto;
in case of 1 of images, example, this:
<img style='margin-left: 50%; margin-right: 50%; margin: auto;' src=... />
of course, should put css in class , set class of want centered class. css class like:
.centered { margin-left: 50%; margin-right: 50%; margin: auto; }
Comments
Post a Comment