656 users online

How to get a new view page to be 100% of the browser height in v2.3

1 2 Next
Posted: 3 months ago Quote
I have tried all the usual things such as:

<table height="100%" style="height:100%;width:100%;">
    <tr>
        <td height="100%" style="height:100%;width:100%;"><img src="../../images/logo2.gif" style="height:100%; width:100%;" height="100%" /></td>
    </tr>
</table>


And every combo possible with divs and spans. I can only assume there must be some weird css somewhere overriding my 100%?

My old css/html code use to work fine in 1.6 (before it moved to MVC), so I just need a pointer in the right direction. My actual page is used to host a Silverlight application, which needs to take up the full space of the browser window, part of which is given below:

<div id="silverlightControlHost" style="height:100%;">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
    <param name="source" value="ClientBin/WordGame.xap"/>
    <param name="onError" value="onSilverlightError" />
    <param name="background" value="white" />
    <param name="minRuntimeVersion" value="3.0.40818.0" />
    <param name="autoUpgrade" value="true" />
    <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">
      <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
    </a>
  </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
    </div>

But instead of taking up the full height, it only takes up about a thid at best, probably less. The 100% width still works fine, it's just the height I am having problems with.

I can only assume there must be some css class or id I need to use? I have even tried basing it on existing views and also tried basing it on a layout of an existing view, but it makes no difference.

Hopefully someone can help me?

Thanks.
David.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 months ago Quote
I'll be more than willing to help, if you could create a concise JS Fiddle of your issue. Remember whenever you need help with CSS/HTML/JavaScript related issues, JS Fiddle is definitely the way to go. It makes it easier for us to help you, and more importantly makes it much quicker for us to help you.

Thanks
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce v2.xx themes >> http://www.ncthemes.com

Want better front end features for nopCommerce 2.xx ? Vote up this >> http://nopcommerce.codeplex.com/workitem/10622
Posted: 3 months ago Quote
body
    {
      margin: 0;
      padding: 0;
      border: none;
      overflow: auto;
    }
    div#page
    {
      text-align: center;
    }
    div#page img
    {
      height: 96%;
      border: none;
      top: 2%;
      position: relative;
    }
  </style>
</head>
<body>
  <div id="page">
    <img src="yourimage.jpg" /></div>
</body>

Chad
This post/answer is useful
-1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 months ago Quote
THanks Chad, I tried it but it still didnt work, it just shows the image with its default height so it does fit the whole screen.

Any other suggestions?

Cheers,
D.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 months ago Quote
Ciwan, I had a look at that JS Fiddle link you sent but there was a lot of options so wasnt sure what you wanted me to do with it? Have you got any clear intructions/steps of what I have to do?

Thank you.

D.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 months ago Quote
Ignore the options on the left.

All you need to do is paste the relevant HTML markup in the HTML pane, and do same for your CSS (i.e. in the CSS pane). Then click Save button (top).

Once saved, copy the URL and paste it here.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce v2.xx themes >> http://www.ncthemes.com

Want better front end features for nopCommerce 2.xx ? Vote up this >> http://nopcommerce.codeplex.com/workitem/10622
Posted: 3 months ago Quote
Right, I have now done this, it can be found here:

http://jsfiddle.net/dellams/FkPWa/

I'm not sure how it helps though since it dosnt show all of the NopCommerce HTML and CSS.

Am I suppose to cut out the JS and CSS from the HTML? Since at the moment the CSS and JS is duplicated into their relevant panes and still remains in the HTML.

Here is the full HTML/CSS/JS from viewing source in the browser, but this will simply be all of the NopCommerce stuff, which you will already know so I am not sure how it will work?

http://jsfiddle.net/dellams/YLjTd/

It can't be this hard, it is a really simple bog standard page and all I want is 100% height, like I use to have. There has to still be some NopCommerce CSS that is preventing this, just need to know where it is and how to work around it?

Thank you.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 months ago Quote
It would be helpful if you can post the link of you website so that we can see where exactly have you placed your silverlight control because there is a hierarchy of classes in the CSS and sizing is applied at many layers so it depends where you place the control.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Thanks & Regards,
Babur.
Posted: 3 months ago Quote
Have you tried using the browser's developer tools (e.g. Chrome - right click element on page, and choose Inspect Element from menu)?

Nop uses several "wrapper" divs on the page - e.g. class=master-wrapper-page
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
If my answer was helpful, please vote it up.
Posted: 3 months ago Quote
New York wrote:
Have you tried using the browser's developer tools (e.g. Chrome - right click element on page, and choose Inspect Element from menu)?

Nop uses several "wrapper" divs on the page - e.g. class=master-wrapper-page

Exactly, thats what I meant. I use Firefox plugin Firebug which is very helpful. You can easily see all the styles being applied even in IE by pressing F12.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Thanks & Regards,
Babur.
1 2 Next