You are viewing our Forum Archives. To view or take place in current topics click here.
HTML and CSS Query
Posted:
HTML and CSS QueryPosted:
Status: Offline
Joined: Dec 30, 201311Year Member
Posts: 1,331
Reputation Power: 69
Hey guys,
I am currently creating a website and I am wanting my logo to be centered in the middle of the page with a top padding of around 10-20 px, basically at the top middle of the page, This is the idea I am going for
CSS Code:
Outcome:
Thanks -0lly
I am currently creating a website and I am wanting my logo to be centered in the middle of the page with a top padding of around 10-20 px, basically at the top middle of the page, This is the idea I am going for
CSS Code:
IMG.navlogo{
position: fixed;
margin-left: auto;
margin-right: auto;
object-position: center;
}
Outcome:
Thanks -0lly
#2. Posted:
Status: Offline
Joined: Feb 15, 201212Year Member
Posts: 194
Reputation Power: 7
Status: Offline
Joined: Feb 15, 201212Year Member
Posts: 194
Reputation Power: 7
Create this class.
.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: May 02, 201212Year Member
Posts: 1,129
Reputation Power: 34
Status: Offline
Joined: May 02, 201212Year Member
Posts: 1,129
Reputation Power: 34
You can also use positions or margins left / right. If you use positions, you have to use relative and use top / left to get it where you want.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.