656 users online
Register
Log in
Shopping Cart
(0)
Home
Product
Overview
Features
Store demo
Screenshots
Showcase - live shops
Copyright Notice Removal
System Requirements
Roadmap
Contribute
Team Members
License
Downloads
Download nopCommerce
Extensions
Release Notes
Support
Documentation
Forums
Partners
Recommended Hosting
Solution Partners
Become a Partner
Community sponsorship program
My Account
Contacts
Tweet
Home
/
Forums
/
General
/
HTML, XHTML, CSS, Design Questions
/
How to get a new view page to be 100% of the browser height in v2.3
How to get a new view page to be 100% of the browser height in v2.3
Reply
1
2
Next
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Ciwan
Total Posts:
510
Karma:
3302
Joined:
1/15/2011
Location:
United Kingdom
PM
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
0
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
cboy
Total Posts:
289
Karma:
1763
Joined:
1/26/2010
Location:
United States
PM
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
-1
Please
login or register
to vote for this post.
(click on this box to dismiss)
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Ciwan
Total Posts:
510
Karma:
3302
Joined:
1/15/2011
Location:
United Kingdom
PM
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.
0
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
dellams
Total Posts:
23
Karma:
125
Joined:
9/18/2010
Location:
United Kingdom
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
infiniti
Total Posts:
106
Karma:
1036
Joined:
10/4/2011
Location:
Pakistan
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Thanks & Regards,
Babur.
New York
Total Posts:
702
Karma:
5977
Joined:
5/22/2011
Location:
United States
PM
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
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
If my answer was helpful, please vote it up.
infiniti
Total Posts:
106
Karma:
1036
Joined:
10/4/2011
Location:
Pakistan
PM
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.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Thanks & Regards,
Babur.