Centering the Background for small resolutions
2 posters
Page 1 of 1
Centering the Background for small resolutions
Hey
I designed the background with 1920x1080 resolution in mind, and when i change the resolution to anything small than that the background won't be aligned no more with the rest of the forum.
This is how it's supposed to look (1920x1080)

and this is a small resolution (1280x720)

I tried experimenting with the body in CSS with static and background-size but i never managed to have it centered.
Pretty much what i'm looking for is that if an user is using a smaller resolution, both sides will be hidden.
I designed the background with 1920x1080 resolution in mind, and when i change the resolution to anything small than that the background won't be aligned no more with the rest of the forum.
This is how it's supposed to look (1920x1080)

and this is a small resolution (1280x720)

I tried experimenting with the body in CSS with static and background-size but i never managed to have it centered.
Pretty much what i'm looking for is that if an user is using a smaller resolution, both sides will be hidden.
PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese
Re: Centering the Background for small resolutions
What is your css??? the problem is not the bg but better yet your "body line" Use chrome to see your CSS for that specific item. Set margin:0 auto; also width would need to be a percentage not fixed. ex. 80% not 900px. If you also use FF you can use firebug, edit your css until correct and then use that style that you generated live
nextlevelgaming- Forumember
-
Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York
Re: Centering the Background for small resolutions
Current .body is like this
- Code:
body {
background-image: url('http://i.imgur.com/238DK.jpg');
background-size: 100%;
background-position: top-center;
width: 100%;
}
PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese
Re: Centering the Background for small resolutions
How much ? (resolution)
Also it seems that the background image is just using the top left corner as a center reference no matter what the resolution is.
Also it seems that the background image is just using the top left corner as a center reference no matter what the resolution is.
PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese
Re: Centering the Background for small resolutions
I think i'm following you.
I'll try editing the background and report later.
PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese
Re: Centering the Background for small resolutions
hmm, i just checked the middle area and it's bigger than 1200 by a couple of pixels on both sides, so it shouldn't give me any troubles right ?
the selection shows a width of 1200

the selection shows a width of 1200

PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese
Re: Centering the Background for small resolutions
That fixed it, tested a couple of different resolutions and the background wouldn't overlay the rest of the forum.
thanks again
-Solved-
thanks again

-Solved-
PT-Desu- Forumember
- Posts : 54
Reputation : 1
Language : Portuguese

» Resolutions Issue? Background different for every user!
» Auto background resize for different resolutions
» What is the best size for a background image for all the screen resolutions?
» Centering the Background?
» Text centering and background
» Auto background resize for different resolutions
» What is the best size for a background image for all the screen resolutions?
» Centering the Background?
» Text centering and background
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum