开发者

Width of website to 740px in facebook app, and 960px for normal site, but centered in browser

开发者 https://www.devze.com 2023-02-11 17:32 出处:网络
I am doing a new app for facebook displayed in a iframe. Entire body of site is made at 100% width, but as facebook app can be displayed within 760px.. the design of site was not looking good in 1280

I am doing a new app for facebook displayed in a iframe.

Entire body of site is made at 100% width, but as facebook app can be displayed within 760px.. the design of site was not looking good in 1280px width at 100%.

So, I would like to use 960px in actual site and 740px in app

I tried the following code to set it to 740px or 960px, but is there any way to set at 960px and then resize in between 960px - 740px or less as per the browser size?

body {
  color: #000000;
  font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
  font-size: 12px;
  width: 740px;
  border-left: 1px dashed #69c;
  border-right: 1px dashed #69c;
  padding: 0px 5px 0px 5px;
开发者_JS百科  margin: 0px auto;
}

Thanks!


You already have it set to 740px all the time (iframe or no)

What you want is:

body {
  max-width: 960px;
  margin: 0px auto;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消