Portfolio: Need help centering navbar icon

Portfolio: Need help centering navbar icon
0

#1

I am trying to get the Brad Anderson part centered but leave the rest where it is…
I’m pretty new so it may be a stupid question but any help is appreciated !

Codepen link


#2

I am also trying to get a background image in there but can’t get it to work…


#3

In order to center the Brad Anderson button in the navbar add these two css rules to it

float: none; 
display: inline-block;

#4

I have those in CSS doesn’t seem to help. I may be doing it wrong though…do I need to target the Brad Anderson specifically ?


#5

Yes you need to target the li that contains Brad Anderson.
float: none resets the float that pulls the enemies to the left
display: inline-block makes it a block element that behaves like an inline element with its sourounding elements.


#6

Well, is seems to work at all.

– you nested elements in CSS, it is allowed only in SCSS, SASS, LESS (maybe more, but those I know).