How to print a webgrid in Landscape in MVC 3 - asp.net

Can any one help me in printing a webgrid in landscape

You have to do this in CSS, defining a stylesheet appropriate for printing. You can't control the printer preferences from a browser.
In other words, is up to the user to select the paper orientation he wants to use. You can only "help it" a bit using appropriate styles for printing. Read here.

One common approach to this is to create a custom print CSS stylesheet. It can be pretty simple.
This short article will guide you through a simple example.
Once you grasp the concepts involved, you can add specific CSS for your web page.
Here are the basic steps:
1) Reset all the padding and margins:
body {margin:0; padding:0; line-height: 1.4em; word-spacing:1px;
letter-spacing:0.2px; font: 13px Arial, Helvetica,"Lucida Grande", serif;
color: #000;}
2) Remove elements you don't want to print, such as the page header, logo, menus, etc. In your case, you may want to hide everything but the grid.
#logo, #catnavi, .topnavi, .more-link, .navigation, #sidebartop, #related, #social,
#sponsors, .tabs, #allpost, .toolbar, .splitbox, #commentform, #commentabs .idTabs,
.postmeta-content .comments, #respond h3, .tag, .footerlinks {display:none;}
3) Optionally, display the URL in the print document (hiding links will hide the URL)
4) Optionally, insert page breaks
#comments {page-break-before: always;}
5) Add a <link> tag at the top of the page to include the .css file.

Related

How To Edit The Font Of A Testimonial Carousel in Squarespace Using CSS?

I am trying to edit the font of some text within a testimonial preset carousel within Squarespace (on the home page of the site linked below).
enter image description here
I have successfully changed the text below it using the following code:
enter image description here
section[data-section-id="63c390bd1403971a5efb5e19"]
.user-items-list-item-container p
{
font-family: "Steelfish";
font-size: 31px;
}
However I cannot seem to find a way to change the font of this main text.
I am open to all suggestions and am getting quite desperate as this job has carried on a lot longer than anticipated.
Any help would be greatly appreciated.
https://orb-seahorse-ha47.squarespace.com/
password123
/* attempt at testimonials top text */
section[data-section-id="63c390bd1403971a5efb5e19"]
.user-items-list-carouselslides user-items-list-carouselslides--initialized p
{
font-family: "Steelfish";
font-size: 31px;
}
Tried this unsuccessfully
Also tried h, h1, h2, h3
Unless we do a lot of digging, it looks like the font-size is going to need the dreaded !important. See if this will work for you:
section[data-section-id="63c390bd1403971a5efb5e19"] h2.list-item-content__title {
font-family: "Steelfish";
font-size: 51px!important;
}

Font does not appear to be being applied Wordpress

I am working on a website for a customer creating my own theme for them, but I cant understand why the fonts are not registring it appears to be still in arial or something instead of robot but I have added the google font in my head its bringing the site into wordpress from flat php
Code i used to add robot is
<link href='//fonts.googleapis.com/css?family=Arvo:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Roboto:400,300italic,300,100italic,100,900italic,900,700italic,700,500italic,400italic,500' rel='stylesheet' type='text/css'>
wordpress version http://webservices.davidbuckleyni.co.uk/wordpress/?page_id=8
live site
http://www.key2credit.com/
their is also a space above where the banner is im thinking i missing a reset script or something
Edit My bad here is the css showing the font being used for body
However i think its just the text within the main banner thats amiss ie where it says Fast cash loans
body {
padding-top: 120px;
padding-bottom:38px;
font-family: 'Roboto', sans-serif;
background: url("./.fs/img/banner2.jpg") repeat;
}
Edit to show here in head im calling this style sheet to reference the font
/wordpress/wp-content/themes/key2credit/style.css
It sounds like the h2 (and possibly your other header) tag styles are being overridden (as they're showing as inherit (or maybe another parent element it's contained within).
Try to specifically target the text in your banner. Add this to your CSS declaration on line 428 of style.css:
.homeBanner .homeBannerContent {
margin-top: 4%;
height: 315px;
font-family: 'Roboto', sans-serif;
}
Your text issue is quite simply happening because the block of T&Cs is set as position:absolute;bottom;0;left;0; meaning, it will float to the bottom left of it's parent container.
It's parent container is the .homeBannerContent div, which doesn't go down to the bottom of the banner. What I'd do, is take the T&Cs text, outside of the home banner content, and make the main banner div has position:relative;. That should stick it to the bottom left of the banner itself.
Or simply remove the position:absolute;bottom:0;left;0; properties from the CSS of the T&Cs box, and have it display as a standard block.

Change title size to a post title using child theme?

I remember my theme had an H1 for my Posts titles in the "Next Posts" section at the end of a post, then out of nowhere it changed to H4, how can I change it to the way it was before?
I've tried but failed everytime.
You can take a look at the "You Might Like This Too" section: http://thenoirportrait.com/2014/08/23/review-chanel-perfection-lumiere-velvet/
Thank you!
Okay let me explain you why having a h4 there is good and how you can change that.
You need to understand something first : In HTML, there's some title level to help the website but also software for disabled people to understand the order of the site. Who is more important etc. You must not think your title in a style way, you must think about it in a level way. So your H4 is fine.
Now if you want to change the size of your H4, you'll have to change their style in your Css. I guess you're using a wordpress, so you'll have to change it in the style.css file.
Go to your editor in wordpress at the bottom of your css file add this line.
h4{
font-family: Prata;
font-weight: 400;
font-size: 1.375rem;
line-height: 1.875rem;
text-align: center;
color: #000;
}
now all your h4 will match your H3, the other alternative is to actually go to the template that contains your post titles and change the post title from h4 to h3

Extending Margins on WordPress CSS

I'm using a WordPress hosted site and my main concern is that the margins aren't as I'd like them to be. I'm not sure how I can express what I mean here, but I'll give it a shot.
This is the homepage with blog posts:
Blog title,
Blog body is this,
continues here... I just
need to increase the right
margin.
Again, it isn't that much to the right as it's displayed here -- it's even placed, I'd just like to extend the right margin, rather. which part of the code with that be in? Should I update it with the code?
Update
Is it this code?
}
.entry-content {
overflow: hidden;
zoom:1;
}
/* Sidebar
or this?
}
h3, #sidebar, .postdata, .entry-content {
font-family:'helvetica neue', helvetica, arial, sans-serif;
}
It's kind of hard to know without more proper technical info (html and css code).
I'm guessing here you should look for entry-content class in the style.css file of your theme directory and add the margin you desire.
If you can't find the class there, just add it at the end of the css file:
.entry-content{
margin-right:100px;
}

How to add a custom paragraph style in my SharePoint 2013 blog?

I have a Share Point 2013 web site and a blog in it. Since my posts will include a lot of special text content, I need to add more styles that I will use on all posts. Typically all styles appear in the top ribbon bar when creating a new post.
How to add the new style in Share Point Designer 2013?
What do I need to do?
What you are looking for are custom styles for the SharePoint RichText editor. The nice thing is that all you have to do is add some custom CSS and SharePoint will magically render new text styles. you can also do this with SharePoint Designer if you have a custom master page or if you just specify the alternate CSS somewhere.
The "magic" CSS is something like the following:
.ms-rteStyle-MySpecialStyle {
-ms-name: "My special style";
font-style: bold;
color: red;
}
h2.ms-rteElement-SpecialHeading{
-ms-name: "Special Heading";
font-style: bold;
color: green;
}
The difference between the two is the rteElement vs. rteStyles, but the difference becomes clear once you look at your screenshot: Page Elements and Text Styles. The difference is that you style particular elements with one, e.g. H1, H2, SPAN, and you style text passages with the other - SharePoint actually adds a span tag around the text and assigns it your style.
Enough of the words, a couple of complete blog articles to help you get started:
How to add custom styles to the ribbon in SharePoint 2013
Add new stlyes to Rich Text Editor ribbon in SP2013 Online
Do you know how to custom styles for RichHtmlEditor in SharePoint 2013?
Please try this code for custom heading and text
h2.ms-rteStyle-customHeading
{-ms-name:"custom heading";
color:gray; }
.ms-rteElement-customTest
-ms-name:"customize text";
{color:black; }

Resources