How does Twitter Bootstrap actually work?
How to Create a Printable Twitter Bootstrap Page
I'm using twitter bootstrap and need to be able to print the page as it looks in the browser. I can print other pages created with Twitter Bootstrap fine, but I cannot print my page using only Twitter Bootstrap. Do I miss a day somewhere?
Official TB page when printing:
My page when printing:
What my site actually looks like:
Make sure a style sheet is assigned to print.
It could be a separate stylesheet:
or one that you share with all devices:
You can then write your styles for printers using media queries in the separate style sheets or in the shared ones:
Bootstrap 3.2 Update: (current version)
The current stable bootstrap version is 3.2.0.
With version 3.2, visible printing is obsolete, so you should use:
Bootstrap 3 update:
Print classes are now in documents: http://getbootstrap.com/css/#responsive-utilities-print
Bootstrap 2.3.1 version:
After adding the bootstrap.css file to your HTML, find the parts you don't want to print and add a class to the tags. Because the CSS file contains:
Replace all with
eg: replace everyone to.
This is the thing that worked for me to get rid of this problem. You can see what to replace.
There is a section of code snippet in the CSS file (Bootstrap 3.3.1 [UPDATE:] through 3.3.5) that virtually removes all of the styling, so you get pretty boring printouts even if it works.
For now, I had to resort to removing the section from bootstrap.css - which I really do Not am happy but my users want direct screenshots so this has to be done. If anyone knows how to suppress it without changing the bootstrap files I would be very interested.
Here is the 'offensive' block of code starting on line 192:
In case anyone is here for a solution for Bootstrap v2.XX seeks. I'm leaving the solution that I was using. This is not fully tested in all browsers, but it could be a good place to start.
1) Make sure the media attribute is from.
2) Create one and make sure its media attribute
3) Inside, add the "Width" of your website in HTML & Body
4.) Reproduce the required media query classes in as they were inside and we disabled them when printing.
Here is the full version of:
To make the print preview look like a tablet or desktop, include Bootstrap as .less rather than .css. You can then overwrite the bootstrap classes at the end of the bootstrap_variables file as follows:
Don't worry about having these variables at the end of the file. LESS supports lazy loading of variables in order for them to be applied.
If you want to keep columns on A4 print (around 540 pixels) this is a good idea
You can use it like this:
- How can Chromebooks get anti-virus software?
- What is branding in the market
- Why does my stomach contract after walking
- Why is LinkedIn needed for business marketing?
- What's good about Windows 10
- How do I prove by induction 1
- Which film has the best background music
- Frustrate difficult video games
- How did you deal with costochondritis
- Who is the most biased TXT member
- Why are bubbles observed under the car door
- What is meant by ring topology
- Who is the new SBI chairman
- Why did Iran adopt Islam
- What is BCC in Materials Science
- Jasmine is a common name for a boy
- Why do ex-boyfriends keep your things
- 400 is a good SAT score
- Which technology sectors make money
- Are the internships at NIEC good
- Is cyclopentane flammable
- What is the volatility trading strategy
- How do you wear a flannel shirt
- Is the Merkava 4 a good tank