Bootstrap affix offset bottom formula - twitter-bootstrap-3

I am having a trouble getting formula for bootstrap affix layout. Please check image for layout.
All green sections height must be dynamic. Affix should move only in white region.
For top offset I use sections A height.
What formula should I use for bottom offset?
CSS side works fine (I guess).

Try calc() formular, something like this.
height: calc(100% - HCpx);
Where HC is height of C in pixel. For Mozilla, Webkit or Opera browser, you will need to add redundant heights as:
.your_css {
height: calc(100% - HCpx);
/* mozilla */
height: -moz-calc(100% - HCpx);
/* webkit */
height: -webkit-calc(100% - HCpx);
/* opera */
height: -o-calc(100% - HCpx);
}

$().affix({
offset: {
top: 0,
bottom: function() {
return(this.bottom = $('.footer').outerHeight(true))
}
});
try this for footer height.
i answered what im understood.
please expain clearly if not..thanks

Related

Constrain window aspect ratio in NW.JS

Is it possible to constrain the aspect ratio of a window in an NW.JS app?
I have content which is 800 x 600. In the package.json manifest, I can define the window settings as...
"window": {
"toolbar": false
, "width": 800
, "height": 600
, "min_width": 800
, "min_height": 600
}
I use CSS to preserve the aspect ratio of the content and to fill the window as well as possible:
html, body{
margin: 0;
height: 100%;
}
main {
position: relative;
width:100vw;
max-width:133.3333vh; /* max-width / width = aspect ratio */
min-width: 800px;
height:75vw;
max-height:100vh; /* max-height / height = aspect ratio */
min-height: 600px;
margin: 0 auto;
}
However, if you make the window too wide, a blank area appears on either side. If you make it too tall for its width, a blank area appears at the bottom.
Is there a setting that forces a given aspect ratio?
Or is there now a window resize event that I can listen for so that I can apply window.resizeTo(height*1.333,height) as soon as the window's size is changed?
There does appear to be a resize event:
https://github.com/nwjs/nw.js/issues/799
https://github.com/nwjs/nw.js/wiki/window
You could use code like this to set your event listener:
gui = require('nw.gui');
w = gui.Window.get();
w.on('resize', yourFunctionHere);
but be careful about changing the window size in the handler (e.g. using resizeTo()) as that will trigger a resize and could cause all kinds of chaos. It might work to make the resize conditional on the current aspect ratio, but I can imagine you could still run into problems if you hit some limit or other. Offhand I don't know if there are some facilities (akin to event bubbling &c) that would help in this situation.

Bootstrap3 Float Button Bottom of Panel

Bootstrap 3:
I'm trying to float a button center halfway outside the panel-footer. But the whole layout is responsive so I need to have it when the screen size is resized or smaller it is still correct.
I created a bootply with my attempt that is close but doesn't stay when the screen is resized.
Thanks,
Nate
Bootply Trial
Is this what you wanted to get? http://www.bootply.com/114327
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.bottom-btn {
left: 50%;
bottom: -17px; /* half of the button height */
margin-left: -77px; /* half of the button width */
/* instead of bottom and margin-left, you can use translateX as well. */
}
play with css position property and use margin to get exact position. see the comments for the .bottom-btn class.

ABCPDF not showing full table data

Please refer to the image below:
It's cutting off some of the table data because of the width. My table width is more than 1000 px. I know The default document size for ABCpdf is 612 by 792.
Using the code below to set document width and height
double w = doc.MediaBox.Width;
double h = doc.MediaBox.Height;
double l = doc.MediaBox.Left;
double b = doc.MediaBox.Bottom;
doc.Transform.Rotate(90, l, b);
doc.Transform.Translate(w, 0);
doc.Rect.Width = h;
doc.Rect.Height = w;
I want to display all tabular data. Do I need to modify my table size? Or do I need to modify the document page size of the pdf?
How could i resolve this issue?
Thanks,
Siva
After reviewing the HTML, I think that I can give you a few tips on how to resolve your issue:
1- Use the Gecko Engine for PDF Rendering:
doc.HtmlOptions.Engine = WebSupergoo.ABCpdf9.EngineType.Gecko;
The Gecko Engine provides better Css compliance when rendering in ABCPdf.
2- In your Css you have overflow-x set to scroll for the inner-container. This causing the behavior that you are seeing. I would add the following Css to the bottom of the Css:
#media print
{
.outer-container {
background-color: #ccc;
position: absolute;
top:0;
left: 0;
right: 300px;
bottom:40px;
overflow: visible;
width: 100%;
}
.inner-container {
width: 100%;
height: 100%;
position: relative;
overflow-x: visible;
}
table
{
width: 100%;
}
}
Notice the #media print which makes the css only effective during print and would not affect that way it shows on the screen.
3- Finally, you can try playing with the browser width:
doc.HtmlOptions.BrowserWidth = 1200;
The only problem with the BrowserWidth property is that it will affect the zoom on the document. All the text fonts will appear smaller.
Good luck...
You haven't specified if you are converting an HTML page to PDF- but I assume you are. If that is the case, have you looked at the browser width property? Look into the XHTMLOptions object properties- it will help you fine tune the rendering:
http://www.websupergoo.com/helppdfnet/source/5-abcpdf/xhtmloptions/

How do I adjust the dojo BorderContainer layout to handle rotated buttons?

I'm trying to implement a navigation toolbar down the left side of my application with rotated buttons. When I rotate the buttons using css transform:rotate, border container still does all of its layout calculations as if the buttons were not rotated so they end up overlapping and in the wrong position vertically. Before I dig into understanding the dijit/layout/utils module well enough to solve this, I'm wondering if anyone already has a solution I'm just not seeing.
Thanks!
Fiddle here http://jsfiddle.net/eric_isakson/2bkKk/6/
JavaScript:
require(["dojo/_base/window", "dijit/Toolbar", "dijit/form/Button", "dijit/layout/BorderContainer"], function(win, Toolbar, Button, BorderContainer) {
var bc = new BorderContainer();
bc.placeAt(win.body(), "last");
var tb = new Toolbar({region: "leading"});
bc.addChild(tb);
var b1 = new Button({label: "button1"});
tb.addChild(b1);
var b2 = new Button({label: "button2"});
tb.addChild(b2);
bc.startup();
tb.startup();
b1.startup();
b2.startup();
});
CSS
html, body {
width: 100%;
height: 100%;
margin: 0;
overflow:hidden;
}
.dijitBorderContainer {
width: 100%;
height: 100%;
}
.dijitButton {
transform:rotate(-90deg);
-ms-transform:rotate(-90deg); /* IE 9 */
-webkit-transform:rotate(-90deg); /* Safari and Chrome */
display: block;
}
Here is the desired appearance:
If i understand you right, you want your Buttons horizontal?
Then you only need to delete the rows for the rotation.
.dijitButton {
display: block;
}
Regards, Miriam

control-nav and positioning

I am trying to position the control nav in flexslider 2 (the dots for each slide). Default is text-align:center. If you change to the left it positions to the left no problem. If you change to right then while it positions to the right it also shows text numbers of each slide over each dot.
How can I position this to the right WITHOUT the text numbers showing up? Furthermore, why are they showing up when aligned to the right?
You can see this happen out of the box in its default state by just changing the value to the below.
/* Control Nav */
.flex-control-nav {width: 100%; position: absolute; bottom: 0px; text-align: right;}
I thought that changing the -9999px to a positive had worked for me, until I realized that it just pushed the text way off the screen. But you could still scroll to it. My fix, leave the text-indent at -9999px; and add
color: rgba(0, 0, 0, 0); .
The last 0 in this controls the alpha, and with it at 0, that makes the numbers completely invisible.
removing width allows positioning without the number issue
I had problems with this, removing the width doesn't work. Here is a solution that does work:
.flex-control-nav {
text-align: right;
}
.flex-control-paging li a {
text-indent: 9999px;
}
When aligning the control nav to the right, you need to change the text indent from negative -9999px to a positive 9999px.
Use this code to adjust the positioning without the numbers.
/* Control Nav */
.flex-control-nav {position: absolute; bottom: 25px; right: 20px;}