开发者

Edit asp header

Loosing my mind with this one.

I created a web application with asp.net and have the meta tag

<meta name="viewport" content="width=350; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" />

to be able to make it more visible with the iwhatever devices. The content was more visible with this tag, but there is a huge amount of white space on the right hand side that the user can see and scroll to.

I added a condition that would resize the div that I put on the page

 var pagediv = document.getElementById("HeadContent");
        if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1) {infodiv.style.wid开发者_运维知识库th = '350px';}

but anything i try to resize the page/header with the asp site.css tag have yet to work.

Thanks in advance for your reply.;


Turns out I needed to edit the entire page

var divs = document.getElementsByClassName('page');
for (var i = 0; i < divs.length; i++) {
                        divs[i].style.width = '450px';
                    }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜