Jump to content
WebFlake
  • 0

Centering Logo


Symp

Question

Hey there, I'm pretty new to web development and I've been trying to center a forum logo without much luck. 

I've tried using margin:0 auto; and float: center;  but the only way I can get the logo to move anywhere is float: right; and margin-left: 100px; (or however many pixels)

I can center the logo using margin-left however when the browser is scaled at all it's no longer any good. If anyone could help I'd really appreciate it thank you!

a.logo{
    height: {theme="ipsf_logoHeight"}px;
    color: {theme="ipsf_logoColor"};
    font-size: {theme="ipsf_logoSize"}px;
    text-decoration: none;
	line-height: 1;
    max-width: 100%
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
}

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

float: center; does not exist. I think you're confusing it with text-align: center; which is probably the answer you're looking for in this case. You should post your HTML as well as your CSS so that we have a better idea of what it looks like (or even better: leave a link to your site so we can use inspect element to quickly figure out the answer).

As mentioned, try using text-align: center;. However, text-align won't work unless if your HTML element possesses a display property of inline, or inline-block. If you're unsure, add this:

display: block; text-align: center;

But again, I can't guarantee that'll work since I don't know how your HTML is set up.

  • Upvote 1

Need some IPB, MyBB, or HTML/CSS work done? Check out my thread!
:smiley:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...