Login | Register | FAQ
Anonymous

Focusing website to the middle on smaller res if possible?

+ Post a reply

6 posts Page 1 of 1


Focusing website to the middle on smaller res if possible?

by TechBiteReviews » Mon Apr 23, 2012 6:30 am

Hi, Im building a website and have got the center bit where all the writing and links and everything on the page is, then i have the background. i would like to get the website just focused on the center part, not the background. currently it does go to the center, but you have a scroll bar to see the sides of the background on smaller screen res. if you go onto a YouTube channel and have it opened in a full-screen page then the background will be there all fine, make the windows smaller and YouTube will automatically re-size the page to the window size and basically 'crop' the background without having the need to put a scroll bar at the bottom.

try it on my YouTube channel here: http://www.youtube.com/user/techbitereviews

I hope you understand and thank you in advance for anyone who can help :)

Gaming96.
User avatar

TechBiteReviews

  • Posts: 13
  • Joined: Fri Apr 20, 2012 3:52 am

Re: Focusing website to the middle on smaller res if possibl

by XainPro » Mon Apr 23, 2012 7:16 am

well to center on any screen you use css like this
#divname {
width:value of width you want to apply
position:relative;
height:auto;
margin:0 auto;
}
User avatar

XainPro

  • Posts: 3669
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: Focusing website to the middle on smaller res if possibl

by TechBiteReviews » Tue Apr 24, 2012 6:01 am

XainPro wrote:well to center on any screen you use css like this
#divname {
width:value of width you want to apply
position:relative;
height:auto;
margin:0 auto;
}


i will try that, thank you :)
User avatar

TechBiteReviews

  • Posts: 13
  • Joined: Fri Apr 20, 2012 3:52 am

Re: Focusing website to the middle on smaller res if possibl

by TechBiteReviews » Wed Apr 25, 2012 5:41 am

Hi, this did not work but i have worked it out now :) iv changed a few things and experimented and it works just how i wanted! thanks
User avatar

TechBiteReviews

  • Posts: 13
  • Joined: Fri Apr 20, 2012 3:52 am

Re: Focusing website to the middle on smaller res if possibl

by XainPro » Wed Apr 25, 2012 10:42 am

TechBiteReviews,
you are very fast learning and never hesitate to experiment new thing you will be master very soon :)
good luck
User avatar

XainPro

  • Posts: 3669
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: Focusing website to the middle on smaller res if possibl

by TechBiteReviews » Wed Apr 25, 2012 4:32 pm

XainPro wrote:TechBiteReviews,
you are very fast learning and never hesitate to experiment new thing you will be master very soon :)
good luck


Thank you! started 3 days ago lol :P
User avatar

TechBiteReviews

  • Posts: 13
  • Joined: Fri Apr 20, 2012 3:52 am


+ Post a reply

Page 1 of 1