wyo9089
wyo9089

Reputation: 37

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.width = '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.;

Upvotes: 1

Views: 152

Answers (1)

wyo9089
wyo9089

Reputation: 37

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';
                    }

Upvotes: 1

Related Questions