in FF flex container affects width and height of child items - firefox

project is made on full BEM-STACK techology, so its not easy to show all code. in project's footer there's almost that following structure :
<div class="footer">
<div class="footer__inner">
<div class="footer__content page__col_8 footer__section">
</div>
<div class="footer__feedback page__col_3 footer__section ">
</div>
<div class="footer__social page__col_1 footer__section">
</div>
</div>
</div>
here are exact styles :
.footer {
height: 180px;
&__inner {
width: 1200px;
margin: 40px auto;
height: 100px;
display: flex;
padding: 0;
}
}
&__section {
box-sizing: border-box;
padding: 20px;
border: 2px solid var(--color-border);
border-right: 0px;
}
}
.page {
&__col {
&_1 {
width : 8.3333333333333%;
}
&_2 {
width : calc(2 / 12 * 100%);
}
&_3 {
width : calc(3 / 12 * 100%);
}
&_4 {
width : calc(4 / 12 * 100%);
}
&_5 {
width : calc(5 / 12 * 100%);
}
&_7 {
width : calc(7 / 12 * 100%);
}
&_8 {
width : calc(8 / 12 * 100%);
}
}
}
.footer {
&__social {
padding: 0px;
border: 1px solid var(--color-border);
width: 100px;
.link {
box-sizing: border-box;
display: inline-block;
width: 49px;
height: 49px;
border: 1px solid var(--color-border);
}
}
}
In all browsers except Firefeox width and height of .link are 49px, border is 1px. And in FF these values are computed into 48.16667px and 0.96667px. How can that be fixed? prefixes should have been added by ENB build system

Related

Next Js with SCSS not applied in production (built-mode)

I have problem with some parts of my spinning-wheel component in built-mode when I deploy my application to server.I have no issue if I run the code locally with "npm run dev", but the problems come when run the code with "npm run build" and "npm start".
Here is the snapshots of development mode (picture 1) and built mode (picture 2):
And this is the scss file I used :
.board-arisan-container {
--wheel-size: 300px;
--wheel-slice-spacing: 50px;
--wheel-border-size: 5px;
--wheel-color: #ffad00;
--neutral-color: #ffffff;
--PI: 3.60;
--nb-item: 0;
--item-nb: 0;
--selected-item: 0;
--nb-turn: 5;
--spinning-duration: 4s;
--reset-duration: 0.25s;
transform: rotate(-90deg);
.wheel-container {
display: block;
position: relative;
box-sizing: content-box;
width: calc(var(--wheel-size) + 2 * var(--wheel-border-size));
height: calc(var(--wheel-size) + 2 * var(--wheel-border-size));
padding: 3px;
margin: auto;
background-color: var(--neutral-color);
border: solid var(--wheel-color) 10px;
border-radius: 50%;
user-select: none;
}
.wheel-container::before,
.wheel-container::after {
content: "";
display: block;
position: absolute;
height: 0;
width: 0;
top: 50%;
transform: translateY(-50%);
z-index: 2;
border: solid transparent 20px;
border-left-width: 0;
}
.wheel-container::before {
right: 0px;
border-right-color: var(--wheel-color);
}
.wheel-container::after {
right: -5px;
border-right-color: var(--neutral-color);
}
/* Roue */
.wheel {
display: block;
position: relative;
box-sizing: content-box;
margin: auto;
width: var(--wheel-size);
height: var(--wheel-size);
overflow: hidden;
border-radius: 50%;
border: solid var(--wheel-color) var(--wheel-border-size);
background-color: var(--wheel-color);
transition: transform var(--reset-duration);
transform: rotate(0deg);
cursor: pointer;
}
.wheel.spinning {
transition: transform var(--spinning-duration);
transform: rotate(calc(var(--nb-turn) * 360deg + (-360deg * var(--selected-item) / var(--nb-item, 1))));
}
.wheel::after {}
.wheel-item {
display: block;
position: absolute;
box-sizing: border-box;
/* position de l'item */
top: 50%;
left: 50%;
width: 50%;
transform-origin: center left;
transform: translateY(-50%) rotate(calc(var(--item-nb) * (360deg / var(--nb-item, 1))));
/* texte */
color: var(--neutral-color);
text-align: right;
padding: 0 50px 0 50px;
font-family: var(--wheel-font);
}
/* Background de l'élément = triangle rose plus clair */
.wheel-item:before {
content: " ";
display: block;
position: absolute;
box-sizing: border-box;
z-index: -1;
width: 0;
height: 0;
top: 50%;
left: 50%;
transform: translate(-47%, -50%);
padding-left: 0px;
--slice-max-width: calc(var(--PI) * var(--wheel-size) + var(--wheel-size) / 2);
--slice-width: calc((var(--slice-max-width) / var(--nb-item)) - var(--wheel-slice-spacing));
border: solid transparent calc(var(--slice-width) / 2);
border-left: solid transparent 0;
border-right: solid var(--neutral-color) calc(var(--wheel-size) / 2);
}
}
here is the the component code :
...
const wheelVars = {
'--nb-item': props.items.length,
'--selected-item': selectedItem,
}
const spinning = selectedItem !== null ? 'spinning' : '';
return( <div className="board-arisan-container">
<div className="wheel-container">
<div className={`wheel ${spinning}`} style={wheelVars} onClick={() => clearSelectedItem()}>
{props.items.map((item, index) => (
<div className="wheel-item" key={index} style={{
'--item-nb': index,
color: '#ffad00',
fontSize: 30,
fontWeight: 'bolder',
}}>
<span>{item}</span>
</div>
))}
</div>
</div>
</div>)
Thanks!

Items on a circle

I'm trying to put hexagons made with CSS around a circle. I already got the circle and the hexagons (they are stocked on top of each other), I just can't get the code of organizing them to work (it's on the CSS part of the code). http://imgur.com/Sv82DB0 (I'm aiming this effect).
$darkPrimary: #ffa000;
$primaryYellow: #ffc107;
$lightPrimaryColor: #ffecb3;
$darkGray: #212121;
$redOrange: #ff5722;
$lightGray: #757575;
$dividerColor: #bdbdbd;
// $rot // rotation for the current item
$nb-items: 4;
$angle: (360deg / $nb-items); // angle between two items
// $nb-items // number of item
$rot: 0;
$circle-size: 21.875em;
#mixin placingElements () {
#for $i from 1 through $nb-items {
.shapes__circle:nth-child(#{$i}) {
// Rotate the axis
rotate: ($rot * 1);
// Move the item from the center
translate: $circle-size / 2;
// Rotate the item back to its default position
rotate: ($rot * -1);
}
$rot: $rot+$angle;
}
//Increments the '$rot' variable for the next item
}
.shapes {
position: absolute;
display: block;
margin-left: 30px;
&__circle {
#include placingElements();
position: relative;
top: 60px;
border: 19px solid $primaryYellow;
border-radius: 50%;
box-shadow: 0 0 1px 0 rgb(255, 255, 255);
width: 350px;
height: 350px;
z-index: 1;
}
&__hexagon {
width: 120px;
height: 80px;
background: $redOrange;
position: absolute;
top: -50px;
left: 90px;
margin: 10px auto;
z-index: 2;
&::before {
content: "";
width: 0;
height: 0;
position: absolute;
top: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-bottom: 45px solid $redOrange;
}
&::after {
content: "";
width: 0;
height: 0;
position: absolute;
bottom: -45px;
left: 0;
border-left: 60px solid transparent;
border-right: 60px solid transparent;
border-top: 45px solid $redOrange;
}
&--inside-img {
position: absolute;
height: 55px;
width: 55px;
left: 25%;
top: 32%;
}
&--inside-text {
position: absolute;
top: -14%;
left: 5%;
font-family: 'Overpass Mono', monospace;
font-size: 1rem;
color: $darkGray;
font-weight: 600;
}
}
}
<div class="shapes__circle">
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
<div class="shapes shapes__hexagon">
<p class="shapes__hexagon--inside-text">Ferramentas</p>
<img class="shapes__hexagon--inside-img" src="./assets/img/ferramentas.png" alt="">
</div>
</div>
<!-- __section-img--circle -->

Stacking and curves in pure-CSS logos

How could one create arbitrary curves with just pure CSS? Is there a 'Bezier' library? I didn't find anything that could match the curve of the outer edge of the logo below.
Looking at the the Shapes of CSS, I think the logo could be approximated with 2 long pink and black rectangle with completely rounded edges tilted 45deg, 3 small white circles in the middle, and some large circles on either side of the rectangles to give that little 'dent'.
Can this shape really be made with just circles?
Update: This is what I've come up with so far (here's a JSFiddle):
<span class='grey logo'>
<span class='black circle' id='left_middle'> </span>
<span class='grey circle' id='left_top'> </span>
<span class='grey circle' id='left_bottom'> </span>
<span class='left black circle'> </span>
<span class='left white small circle'> </span>
<span class='top grey circle' id='left_right'> </span>
<span class='pink circle' id='right_middle'> </span>
<span class='top pink circle'> </span>
<span class='top white small circle'> </span>
<span class='right pink circle'> </span>
<span class='right white small circle'> </span>
<span class='grey circle' id='right_top'> </span>
<span class='grey circle' id='right_bottom'> </span>
</span>
and:
/* normalize CSS */
.logo, .logo *, .logo *:before, .logo *:after {
display: block;
margin: 0;
padding: 0;
background: transparent;
font: normal normal 0/0 serif;
border: 0;
outline: 0;
}
.logo {
position: relative;
overflow: hidden;
margin: 0 0;
width: 500px;
height: 500px;
}
.logo * {
position: absolute;
}
/* colors */
.logo [class*=pink] {
background-color: rgb(217, 27, 91);
}
.logo [class*=white] {
background-color: white;
}
.logo [class*=black] {
background-color: black;
}
[class*=grey] {
background-color: rgb(240, 240, 240)
}
/* shapes */
.logo [class*=circle] {
width: 100px;
height: 100px;
border-radius: 50px;
-moz-border-radius: 50;
-webkit-border-radius: 50px;
}
.logo [class*=small] {
margin-left: 20px;
margin-top: 20px;
width: 60px;
height: 60px;
}
/* positions */
.logo [class*=top] {
left: 108px;
top: 8px;
}
.logo [class*=left] {
left: 46px;
top: 70px;
}
.logo [class*=right] {
left: 170px;
top: 70px;
}
.logo #left_middle {
left: 76px;
top: 40px;
}
.logo #right_middle {
left: 140px;
top: 40px;
}
.logo #left_top {
left: 13px;
top: -25px;
}
.logo #right_top {
left: 203px;
top: -25px;
}
.logo #left_bottom {
left: 141px;
top: 103px;
}
.logo #right_bottom {
left: 75px;
top: 103px;
}
.logo #left_right {
margin-left: -5px;
margin-top: -5px;
width: 110px;
height: 110px;
}
The problem now is, no matter how I arrange my elements, the stacking is always messed up.
The problem is from GCI 2013.
Something to get you started
CSS
.circ {
width: 100px;
height: 100px;
background: red;
-moz-border-radius: 50;
-webkit-border-radius: 50px;
border-radius: 50px;
}
.circ-small {
width: 65px;
height: 65px;
background: #fff;
-moz-border-radius: 33;
-webkit-border-radius: 33px;
border-radius: 33px;
}
div{
position:absolute;
}
HTML
<div class="circ" style="left:40px;top:40px;"></div>
<div class="circ"></div>
<div class="circ" style="left:70px;top:70px;"></div>
<div class="circ" style="left:103px;top:-25px;background-color:#fff"></div>
<div class="circ" style="left:-25px;top:103px;background-color:#fff"></div>
<div class="circ-small" style="left:25px;top:25px;"></div>
<div class="circ-small" style="left:88px;top:88px;"></div>
To leave you with a small rest of homework for the challenge, I'll just post the beginning of the code which won't suffer of overlapping issues. If you inspect the code carefully, you will see, that I didn't work with full circles here, but used a mix of transparent and colored borders. This solves the overlapping issue as well as decreasing the number of elements needed in total.
Your starting point
The essential part are the pseudo elements (here with different colors and z-indizes):
.pinky:before{
right:-84px;bottom:-1px;
height:30px;width:50px;
border-radius:50%;
z-index:1;
border:20px solid transparent;
border-bottom-color: $pink;
#include transform( rotate(45deg) );
}
You should start with changing colors and z-indizes for yourself to see how it was built and once you got into it complete the rest of the logo.
I did it! I had to get used to only being able to use 'border-radius' for any kind of shape in CSS† though (note: not entirely true).
The main problem here is the overlapping one caused by a cycle of shapes having to be above each other.
The 2 main approaches here are:
using a transparent shape and a solid right border (thanks, #Christoph!) to 'cut' from the gear connector (shown below);
simulating negative border-radii using CS3 gradients for the gear connector so no shapes to cut the part that we don't want are required (better, as allows for a transparent background);
Here's a JSFiddle with the compiled CSS, and the result of the first approach.
HTML:
<span class='wrapper'>
<span class='logo'>
<span class='circle black' id='left_middle'> </span>
<span class='circle dark_grey' id='left_right'> </span>
<span class='circle grey' id='left_left'> </span>
<span class='circle left black'> </span>
<span class='circle left small white'> </span>
<span class='circle top grey' id='left_top'> </span>
<span class='circle pink' id='right_middle'> </span>
<span class='circle grey' id='right_right'> </span>
<span class='grey' id='right_left'> </span>
<span class='circle top pink'> </span>
<span class='circle top white small'> </span>
<span class='circle right pink'> </span>
<span class='circle right small white'> </span>
</span>
<span class='text'>
<span class='bold'>BRL</span><span class='thin'>CAD</span>
</span>
</span>
SCSS/SASS:
/* Fonts */
#font-face {
font-family: 'BRL-CAD';
src: url('fonts/Grandesign Neue Roman.ttf');
}
#font-face {
font-family: 'BRL-CAD Bold';
src: url('fonts/Grandesign Neue Roman Bold.ttf');
}
/* Shapes */
$large_radius: 75px;
$small_radius: 45px;
/* Positions */
$all_left: 10px;
$all_top: 55px;
$top_left: $all_left + 55px;
$top_top: $all_top;
$left_left: $all_left;
$left_top: $all_top + 52px;
$right_left: $all_left + 100px;
$right_top: $all_top + 57px;
$right_middle_left: ($top_left + $right_left) / 2;
$right_middle_top: ($top_top + $right_top) / 2;
$right_right_left: $all_left + 129px;
$right_right_top: $all_top - 11.5px;
$right_left_diff: 50px;
$right_left_left: $all_left + 63px;
$right_left_top: $all_top + 72.5px;
$left_middle_left: ($top_left + $left_left) / 2;
$left_middle_top: ($top_top + $left_top) / 2;
$left_right_left: $all_left + 73.5px;
$left_right_top: $all_top + 64.5px;
$left_left_left: $all_left - 18px;
$left_left_top: $all_top - 21px;
$left_top_diff: 3px;
$left_top_left: $top_left - $left_top_diff;
$left_top_top: $top_top - $left_top_diff;
$logo_width: $right_left + $large_radius + $all_left;
$logo_height: $right_top + $large_radius + $all_top ;
$all_width: $logo_width + 290px;
$all_height: $logo_height;
/* Colors */
$pink: rgb(217, 27, 91);
$grey: rgb(235, 235, 235);
$dark_grey: rgb(230, 230, 230);
/* Normalized CSS */
.wrapper, .wrapper .logo, .wrapper .logo *, .wrapper .logo *:before, .wrapper .logo *:after {
display: block;
margin: 0;
padding: 0;
border: 0;
outline: 0;
background: transparent;
}
/* Logo + Text */
.wrapper {
/* CSS Tricks */
position: relative;
overflow: hidden;
width: $all_width ;
height: $all_height;
> * {
float:left;
display:inline;
}
/* Background */
$start: rgb(240, 240, 240);
$stop: rgb(225, 225, 225);
background: $dark_grey; // non-CSS3 browsers
background: -webkit-gradient(linear, left top, left bottom, from($start), to($stop)); // for WebKit
background: -moz-linear-gradient(top, $start, $stop); // for Firefox
background: linear-gradient(0deg, $stop, $start); // for standards-compliance
/* Logo */
.logo {
/* CSS Tricks */
#extend .wrapper;
width: $logo_width ;
height: $logo_height;
* {
position: absolute;
}
/* Colors */
#mixin colorize($name, $color) {
[class*=#{$name}] {
background-color: $color;
}
}
#include colorize('white', white);
#include colorize('black', black);
#include colorize('pink', $pink);
#include colorize('grey', $grey);
#include colorize('dark_grey', $dark_grey);
/* Shapes */
[class*=circle] {
width: $large_radius;
height: $large_radius;
border-radius: 50%;
}
[class*=small] {
$margin: ($large_radius - $small_radius) / 2;
margin-left: $margin;
margin-top: $margin;
width: $small_radius;
height: $small_radius;
}
/* Classes and IDs */
[class*=top] {
left: $top_left;
top: $top_top;
}
[class*=left] {
left: $left_left;
top: $left_top;
}
[class*=right] {
left: $right_left;
top: $right_top;
}
#right_middle {
left: $right_middle_left + 5px;
top: $right_middle_top;
}
#right_right {
left: $right_right_left;
top: $right_right_top;
}
#right_left {
left: $right_left_left;
top: $right_left_top;
$radius: $right_left_diff;
width: $radius / 2;
height: $radius;
border-right: $radius / 4 solid $dark_grey;
border-radius: 0 $radius / 2 $radius / 2 0;
background: transparent;
}
#left_middle {
left: $left_middle_left; //76px;
top: $left_middle_top; //40px;
}
#left_right {
left: $left_right_left;
top: $left_right_top;
}
#left_left {
left: $left_left_left;
top: $left_left_top;
}
#left_top {
left: $left_top_left;
top: $left_top_top;
$radius: $large_radius + 2*$left_top_diff;
width: $radius;
height: $radius;
}
}
/* Text */
.text {
margin-left: 5px;
margin-top: $all_top + 10px;
font-size: 75px;
.bold {
color: $pink;
font-weight: bold;
font-family: 'BRL-CAD Bold', sans-serif;
}
.thin {
color: black;
font-family: 'BRL-CAD', sans-serif;
}
}
}

Add Legend in negativeSeries bar chart

I want to add legend for both positive values and negative values like the image attached.How can I achieve this? Please help me.
My Tried Code is FIDDLE
xSeries = [["a", -1], ["b", 2], ["c", -3], ["d", 5]];
var barChartOptions = {
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'vertical',
barWidth:10,
varyBarColor: true,
},
fillToZero: true,
fillAxis: 'x',
pointLabels: {
// show: true
},
pointLabels : {
show : true,
hideZeros : true,
location : 's',
ypadding : 12
}
},
legend : {
show : true,
placement : 'outsideGrid',
fontFamily : 'OpenSans-Regular',
marginTop : '100px',
textColor : '#414141',
rowSpacing : '14px',
border : 'none',
background : 'transparent'
},
series : [{
label : "Greater",
lineWidth : 1,
// Use (open) circlular markers.
markerOptions : {
style : "filledCircle"
}
}],
seriesColors: ["#7DAB0B"],
negativeSeriesColors: ["#D99F03"],
axes:{
yaxis:{
renderer: $.jqplot.LinearAxisRenderer,
fontFamily : 'OpenSans-Regular',
label : "kWh",
textColor : '#414141',
tickOptions : {
show : true,
fontFamily : 'OpenSans-Regular',
textColor : '#414141',
fontSize : '10pt'
}
},
xaxis:{
label : "Date",
renderer : $.jqplot.CategoryAxisRenderer,
labelRenderer : $.jqplot.CanvasAxisLabelRenderer,
tickRenderer : $.jqplot.CanvasAxisTickRenderer,
//renderer: $.jqplot.CategoryAxisRenderer,
fontFamily : 'OpenSans-Regular',
textColor : '#414141',
tickOptions : {
angle : -60,
show : true,
fontFamily : 'OpenSans-Regular',
textColor : '#414141',
fontSize : '10pt'
}
},
},
grid : {
background : 'transparent',
gridLineColor : '#c5c5c5'
}
};
try {
var plotBarChart = $.jqplot("chart1", [xSeries], barChartOptions);
} catch (e) {
// alert(e);
}
Make sure your code follows this format.
also be sure to include jquery.jqplot.css
include it: <script src="https://bitbucket.org/cleonello/jqplot/raw/e8af8a37f0f14ea1e8c630ecfe6f1b1933794036/src/jquery.jqplot.css"></script>
Or copy the following code into your css file:
//jquery.jqplot.css
/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
.jqplot-target {
position: relative;
color: #666666;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 1em;
/* height: 300px;
width: 400px;*/
}
/*rules applied to all axes*/
.jqplot-axis {
font-size: 0.75em;
}
.jqplot-xaxis {
margin-top: 10px;
}
.jqplot-x2axis {
margin-bottom: 10px;
}
.jqplot-yaxis {
margin-right: 10px;
}
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis, .jqplot-yMidAxis {
margin-left: 10px;
margin-right: 10px;
}
/*rules applied to all axis tick divs*/
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick, .jqplot-yMidAxis-tick {
position: absolute;
white-space: pre;
}
.jqplot-xaxis-tick {
top: 0px;
/* initial position untill tick is drawn in proper place */
left: 15px;
/* padding-top: 10px;*/
vertical-align: top;
}
.jqplot-x2axis-tick {
bottom: 0px;
/* initial position untill tick is drawn in proper place */
left: 15px;
/* padding-bottom: 10px;*/
vertical-align: bottom;
}
.jqplot-yaxis-tick {
right: 0px;
/* initial position untill tick is drawn in proper place */
top: 15px;
/* padding-right: 10px;*/
text-align: right;
}
.jqplot-yaxis-tick.jqplot-breakTick {
right: -20px;
margin-right: 0px;
padding:1px 5px 1px 5px;
/* background-color: white;*/
z-index: 2;
font-size: 1.5em;
}
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
left: 0px;
/* initial position untill tick is drawn in proper place */
top: 15px;
/* padding-left: 10px;*/
/* padding-right: 15px;*/
text-align: left;
}
.jqplot-yMidAxis-tick {
text-align: center;
white-space: nowrap;
}
.jqplot-xaxis-label {
margin-top: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-x2axis-label {
margin-bottom: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-yaxis-label {
margin-right: 10px;
/* text-align: center;*/
font-size: 11pt;
position: absolute;
}
.jqplot-yMidAxis-label {
font-size: 11pt;
position: absolute;
}
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
/* text-align: center;*/
font-size: 11pt;
margin-left: 10px;
position: absolute;
}
.jqplot-meterGauge-tick {
font-size: 0.75em;
color: #999999;
}
.jqplot-meterGauge-label {
font-size: 1em;
color: #999999;
}
table.jqplot-table-legend {
margin-top: 12px;
margin-bottom: 12px;
margin-left: 12px;
margin-right: 12px;
}
table.jqplot-table-legend, table.jqplot-cursor-legend {
background-color: rgba(255, 255, 255, 0.6);
border: 1px solid #cccccc;
position: absolute;
font-size: 0.75em;
}
td.jqplot-table-legend {
vertical-align:middle;
}
/*
These rules could be used instead of assigning
element styles and relying on js object properties.
*/
/*
td.jqplot-table-legend-swatch {
padding-top: 0.5em;
text-align: center;
}
tr.jqplot-table-legend:first td.jqplot-table-legend-swatch {
padding-top: 0px;
}
*/
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
cursor: pointer;
}
.jqplot-table-legend .jqplot-series-hidden {
text-decoration: line-through;
}
div.jqplot-table-legend-swatch-outline {
border: 1px solid #cccccc;
padding:1px;
}
div.jqplot-table-legend-swatch {
width:0px;
height:0px;
border-top-width: 5px;
border-bottom-width: 5px;
border-left-width: 6px;
border-right-width: 6px;
border-top-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-style: solid;
}
.jqplot-title {
top: 0px;
left: 0px;
padding-bottom: 0.5em;
font-size: 1.2em;
}
table.jqplot-cursor-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
}
.jqplot-cursor-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
white-space: nowrap;
background: rgba(208, 208, 208, 0.5);
padding: 1px;
}
.jqplot-highlighter-tooltip, .jqplot-canvasOverlay-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
white-space: nowrap;
background: rgba(208, 208, 208, 0.5);
padding: 1px;
}
.jqplot-point-label {
font-size: 0.75em;
z-index: 2;
}
td.jqplot-cursor-legend-swatch {
vertical-align: middle;
text-align: center;
}
div.jqplot-cursor-legend-swatch {
width: 1.2em;
height: 0.7em;
}
.jqplot-error {
/* Styles added to the plot target container when there is an error go here.*/
text-align: center;
}
.jqplot-error-message {
/* Styling of the custom error message div goes here.*/
position: relative;
top: 46%;
display: inline-block;
}
div.jqplot-bubble-label {
font-size: 0.8em;
/* background: rgba(90%, 90%, 90%, 0.15);*/
padding-left: 2px;
padding-right: 2px;
color: rgb(20%, 20%, 20%);
}
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
background: rgba(90%, 90%, 90%, 0.7);
}
div.jqplot-noData-container {
text-align: center;
background-color: rgba(96%, 96%, 96%, 0.3);
}

CSS/HTML: Cannot modify img's height inside display: table

I'm trying to make a centered, 100% high layout that has NO FIXED width (argh). Everything seems to be ok with the solution below, apart from the img that I need to scale to height: 100%, that doesn't scale inside table-cell (outside of the div everything's ok).
EDIT: I am able to set fixed height like 100px or so, both in css and tag. Why doesn't this work with %?
<div id="center">
<div id="tcontainer">
<div id="tleft">a</div>
<div id="tright"><img id="bgright" src="images/bgright1.jpg" height="100px" /></div>
</div>
</div>
And styles:
html,body {
margin:0;
padding:0;
height:100%; /* needed for container min-height */
font-family:arial,sans-serif;
font-size:small;
color:#666;
}
#bgrepeat { /* unnecessary ATM */
width: 100%;
height: 100%;
position: absolute;
z-index: 0;
}
#bgright { /* HERE THE PROBLEM */
height: 100%;
}
img { border: 0; /*float: left;*/ }
#center {
text-align: center;
height: 100%;
}
#tcontainer {
text-align: left; /* POTRZEBNE ? */
background: red;
height: 100%;
display: table;
margin: 0 auto;
}
#tleft {
display: table-cell;
}
#tright {
background: pink;
display: table-cell;
}
OK, so the problem has been baldy formulated. I've had just forgotten to pass "height: 100%" in consecutive children. It didn't have anything to do with display: table nor images.

Resources