Skip to content

Instantly share code, notes, and snippets.

@surefirewebserv
Last active August 31, 2023 15:51
Show Gist options
  • Save surefirewebserv/5621245 to your computer and use it in GitHub Desktop.
Save surefirewebserv/5621245 to your computer and use it in GitHub Desktop.
Center Simple Social Icons when doing responsive styles
/* Align Simple Social Icons Centered */
.simple-social-icons ul.alignright,
.simple-social-icon ul.alignleft {
text-align: center;
}
.simple-social-icons ul.alignright li,
.simple-social-icons ul.alignleft li {
display: inline-block;
float: none;
}
/* Align everything center */
.alignright,
img.alignright,
.aligncenter,
img.aligncenter,
.alignleft,
img.alignleft {
display: block;
margin: 0 auto 24px;
float:none;
}
@aaronstpierre
Copy link

Thanks for this!

@cre8tivediva
Copy link

I scouring the web for this. Thanks Jonathan!

@jfoutch
Copy link

jfoutch commented Aug 16, 2015

Thanks!

@claytonschase
Copy link

Awesome snippet! I needed to add text-align: center; to the following style.

/* Align everything center */
.alignright,
img.alignright,
.aligncenter,
img.aligncenter,
.alignleft,
img.alignleft {
display: block;
margin: 0 auto 24px;
float:none;
text-align: center;
}

@ScottFromPA
Copy link

Thanks man, this is going straight into my Evernote file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment