I know we can adjust orientation of print page on widow by below CSS code
#media print {
#page {
size : landscape
}
}
But after I implement this code with import from 'print.css',
Chrome hides the selection option of layout and fixes to only landscape.
Because of this phenomenon, other pages which don't need to adjust their layout are forced to print out with the landscape option.
Is there any way to set only the targeted page printed out horizontally?
Like can we remove CSS option right after printing out the targeted page is printed out or target a specific area with id or class name?
I have been suffering from this problem for almost 1 week :(
Related
I have a website with a list of checkboxes that can be used for printing as well. Though when printing it should print a clean slate, not the current state of the checkboxes on the website. However, I don't want to clear the state on the page itself, only on the printed version.
So is it possible to visually remove the tick from checkboxes in CSS?
Something like:
#media print
{
input[type=checkbox]
{
tick: none;
}
}
I suggest following approach.
In print you want just the border square box which can be manually ticked, right?
So in print CSS you might just change the design of check boxes so that you hide the original checkbox html , doesn't matter if checked or not. And then just style or show a square border box using some pseudo selector like : before :after, , good enough for a checkbox looking box for printing.
As via CSS you can change design and not the html state of the forms. So in media query of print or print style sheet only option is designing, styling...
I'm using bootstrap 3.3.7 and I use the standard bootstrap classes to create a menu. I've restyled it so that the color is set to white with a purple backcolor. All is fine when the page is initially loaded. As I reduce the screen width with the mouse, my menu starts to collapse down as expected, but the menuappears to disappear. If I stop reducing the screen size and I then move my mouse over where the menu should be at that point it comes back into view. So the action is working, the menu isn't keeping it's color scheme whilst being moved. Have a missed a trick somewhere?
I get the same issue if I size my screen to e 767 such that my 'hamburger' button appears for the menu. I click the hamburger and nothing seems to display until I move my mouse over the left of the screen where the menu is.
When you resize you viewport size with your mouse, the end result is not always correctly shown because of the javaScript working on that resize.
Try to use only the specific window sizes given: Ipad Pro, Ipad, etc. After selecting use a CTRL + F5 or CTRL + SHIFT + R for a hard refresh, and afterwards tell me if the problem persists.
Also, check the built-in styles from bootstrap, it may change when you are on a tablet or mobile device.
codepen.io/bilpor/pen/gjRQgj
So after seeing the codepen, this is the desktop result.
This is the menu before I hover over it.
And this is the image after I hover over elements.
Regarding your issue, use you javascript code to run only on desktop.
$(document).ready(function () {
if (screen.width < 1024) {
// your code that affect navbar here
}
else {
alert(Error!);
}
});
setting nav-sm on body for making sidebar take least real state on any layout , it works on desktop size, but for tablet it does not hide it like nav-md or on phone it does not hide it like nav-md used to. what is the best way to set side-bar menu to take least real state as possible for any screen size.
Just change your body class from "nav-md" to "nav-sm"
So this will be the code:
<body class="nav-sm">
//
// your page content
//
</body>
You should be aware of classes in all dom element to have a responsive site, not just in body tag.
I have noticed this for a while however that when using Lightswitch and setting properties to "Stretch to Container", that the screen sometimes appears to be over-stretched and moves items down to the next line, for example:
When pressing the "See My Projects Only" the buttons switch (so I hide this one and display the other option" using the below code:
if (screen.ChangeDefaultValue.count > 0) {
screen.ChangeDefaultValue.selectedItem = screen.ChangeDefaultValue.data[0];
screen.ChangeDefaultValue.selectedItem.HomepageProjectsDefault = false;
screen.DefaultOption = null;
myapp.applyChanges();
setTimeout(function () {
screen.Projects.refresh();
}, 100);
screen.findContentItem("SeeAllProjects").isVisible = false;
screen.findContentItem("SeeMyProjectsOnly").isVisible = true;
}
else {
}
This works perfectly, however as you can see in the 2nd image above, the button moves down below the parameter search box as if it has been overstretched. I have tried changing the margin and padding of the .msls-content however this error still occurs here and on multiple of my other pages.
Has anyone found a fix to this problem?
Further information:
I am using msls-2.5.3.css and is declared in the default.htm file
I have tried this https://social.msdn.microsoft.com/Forums/vstudio/en-US/fb1305c5-ac13-474e-8ae0-df74ebf12590/html-client-custom-control-stretch-to-container-sizing-bug-problem?forum=lightswitch
THE PROBLEM
this small block of code in the msls-2.5.3.css appears to be the issue however if I comment it out then other screens break. all of the padding in the height appears to disappear and they all overlap each other on the modal screens
.msls-clear {
clear: both;
}
In LightSwitch HTML, we can use column layout option to render the control in each column. By setting "stretch to container" property, column is only stretched to container size and not the control inside each column is stretched with container. Controls are properly rendered inside the container. Issue occurs due to the column width stretches when hide and show the content item and this is not related with component used in the page. Follow the below workaround solution while remove the content item dynamically by click on the button. Please remove the class ‘msls-clear’ on button click or apply clear: none to the class ‘msls-clear’.
this.element.parents(".msls-column").next(".msls-clear").removeClass("msls-clear")
Hope this will helps you..!
Thanks,
Francis
Im no expert in CSS but this appears to have fixed my issues:
.msls-clear {
clear: right;
max-width: 1850px;
}
all of the machines I have tested have a resolution of 1920 x 1080 so by reducing the width down slightly it will never over stretch the items.
I did originally comment out the clear: right; which worked in internet explorer, however I tested some Syncfusion controls in google chrome/firefox. I could not click on any of them and therefore had to add in the max-width.
If someone can propose a better solution I would be grateful but at least for now this works
I am designing a menu. I want it to appear when one visits the page online, but I do not want it to print.
Is there some setting in the properties(one gets to this when right clicking on a figure in design page of the .aspx file)
Thanks!
There's no specific property in the aspx or in the controls. However, you can use css to modify the visibility or layout of the printed form.
Here's more info http://coding.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/
Use CSS!
#media print
{
.hideonprint{display:none;}
}
#media screen
{
.hideonprint{display:table-cell;}
}
and set the class of menuwrapper to hideonprint