Snoopi Posted January 14, 2012 Posted January 14, 2012 hello. i have making a website and i got a problem in my screen is ok but when i go to other screen with more resolution in left side is blank.i want to make my websites to fill with all screens. i have search for fix it but i didn't find smth.any idea how to do that? -thanks Quote
Blane Posted January 14, 2012 Posted January 14, 2012 How could we know what's your code? I mean. It should be something with css, but we're unable to help if we don't know the code itself. Quote
l2Netherworld Posted January 14, 2012 Posted January 14, 2012 i have the same problem my code is body { width:100%; margin:auto; min-width:600px; max-width:2000px; background-repeat: no-repeat; margin-left: 0%; margin-top: 0%; margin-right: 100%; margin-bottom: 0%; background-attachment: fixed; background-position: center center; position: static; height: auto; } its in html but it doesnt work for some reason... Quote
B00D Posted January 14, 2012 Posted January 14, 2012 try to make a container-wrapper with standar height-width and position and put all others into there. Quote
Snoopi Posted January 14, 2012 Author Posted January 14, 2012 How could we know what's your code? I mean. It should be something with css, but we're unable to help if we don't know the code itself. *{ margin:0; padding:0; } body { background-image:url(bg.jpg); background-repeat:no-repeat; min-width:1158px; min-height:913px; background-color:#000000; color:#CCC; font-family:"Trebuchet MS", "Arial", "Helvetica", "sans-serif"; font-size:13px; margin:0;padding:0; } Quote
Blane Posted January 15, 2012 Posted January 15, 2012 To sum up, if you want something to be centered, the most common solution is to make a div of an id ("wrapper" used commonly) at the top level. That means, the div is in the top level of everything. Then in your css: div#wrapper { width: 960px; margin: 0 auto; } Beware, the wrapper has to have a specific width in order to be centerized. 960 pixels is the most common value for that, since it's the lowest resolution for modern web browsers and computers. Hope I helped... Quote
B00D Posted January 15, 2012 Posted January 15, 2012 To sum up, if you want something to be centered, the most common solution is to make a div of an id ("wrapper" used commonly) at the top level. That means, the div is in the top level of everything. Then in your css: div#wrapper { width: 960px; margin: 0 auto; } Beware, the wrapper has to have a specific width in order to be centerized. 960 pixels is the most common value for that, since it's the lowest resolution for modern web browsers and computers. Hope I helped... or try margin : auto auto; Quote
Blane Posted January 15, 2012 Posted January 15, 2012 or try margin : auto auto; It won't work. ;-) Quote
B00D Posted January 15, 2012 Posted January 15, 2012 on my website i got : margin-left: auto; margin-right: auto; Quote
Blane Posted January 15, 2012 Posted January 15, 2012 on my website i got : margin-left: auto; margin-right: auto; Yeah but that's different than this: or try margin : auto auto; There are top and bottom margins too. The above statement stands for: margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: auto; And what I ment with margin: 0 auto; is only right and left margins set to auto (that makes the centering). Anyway, margin: auto auto is really different than margin: 0 auto and the second is what we want :) Quote
B00D Posted January 16, 2012 Posted January 16, 2012 Yeah but that's different than this: There are top and bottom margins too. The above statement stands for: margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: auto; And what I ment with margin: 0 auto; is only right and left margins set to auto (that makes the centering). Anyway, margin: auto auto is really different than margin: 0 auto and the second is what we want :) i know. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.