windows mozilla dosen't support position absolue - css

When I try to use position: absolute on a div in Firefox it doesn't seem to work.
For jquery calender I used position:absolute for a div it seems to work all browsers in linux and windows except mozilla in windows. When I remove the position:absolute it will work in windows firefox but only showing alternate months in all other browsers (january, march, may, ..)
<div class="body">
<div class="inner">
<div class="container a pickable month" style="z-index: 999; left: 0px; visibility: visible;
opacity: 1; display: block;">
<div class="row a odd">
<div class="first">
Su</div>
<div>
Mo</div>
<div>
Tu</div>
<div>
We</div>
<div>
Th</div>
<div>
Fr</div>
<div class="last">
Sa</div>
</div>
<div class="row b even">
<div class="outside first">
28</div>
<div class="outside">
29</div>
<div class="outside">
30</div>
<div>
1</div>
<div>
2</div>
<div>
3</div>
<div class="last">
4</div>
</div>
<div class="row c odd">
<div class="first">
5</div>
<div>
6</div>
<div>
7</div>
<div>
8</div>
<div>
9</div>
<div>
10</div>
<div class="last">
11</div>
</div>
<div class="row d even">
<div class="first">
12</div>
<div>
13</div>
<div>
14</div>
<div>
15</div>
<div>
16</div>
<div>
17</div>
<div class="last">
18</div>
</div>
<div class="row e odd">
<div class="first">
19</div>
<div>
20</div>
<div>
21</div>
<div>
22</div>
<div>
23</div>
<div>
24</div>
<div class="last">
25</div>
</div>
<div class="row f even">
<div class="first">
26</div>
<div>
27</div>
<div>
28</div>
<div>
29</div>
<div>
30</div>
<div>
31</div>
<div class="outside last">
1</div>
</div>
<div class="row g odd">
<div class="outside first">
2</div>
<div class="outside">
3</div>
<div class="outside">
4</div>
<div class="outside">
5</div>
<div class="outside">
6</div>
<div class="outside">
7</div>
<div class="outside last">
8</div>
</div>
</div>
<div class="container b pickable month" style="z-index: 998; visibility: visible;
opacity: 1; display: block; left: -200px;">
<div class="row a odd">
<div class="first">
Su</div>
<div>
Mo</div>
<div>
Tu</div>
<div>
We</div>
<div>
Th</div>
<div>
Fr</div>
<div class="last">
Sa</div>
</div>
<div class="row b even">
<div class="outside first">
31</div>
<div>
1</div>
<div>
2</div>
<div>
3</div>
<div>
4</div>
<div>
5</div>
<div class="last">
6</div>
</div>
<div class="row c odd">
<div class="first">
7</div>
<div>
8</div>
<div>
9</div>
<div>
10</div>
<div>
11</div>
<div>
12</div>
<div class="last">
13</div>
</div>
<div class="row d even">
<div class="first">
14</div>
<div>
15</div>
<div>
16</div>
<div>
17</div>
<div>
18</div>
<div>
19</div>
<div class="last">
20</div>
</div>
<div class="row e odd">
<div class="first">
21</div>
<div>
22</div>
<div>
23</div>
<div>
24</div>
<div>
25</div>
<div>
26</div>
<div class="last">
27</div>
</div>
<div class="row f even">
<div class="first">
28</div>
<div>
29</div>
<div>
30</div>
<div class="outside">
1</div>
<div class="outside">
2</div>
<div class="outside">
3</div>
<div class="outside last">
4</div>
</div>
<div class="row g odd">
<div class="outside first">
5</div>
<div class="outside">
6</div>
<div class="outside">
7</div>
<div class="outside">
8</div>
<div class="outside">
9</div>
<div class="outside">
10</div>
<div class="outside last">
11</div>
</div>
</div>
</div>
</div>
Style sheet is http://snagglefoot.net/ainc/calendar-eightysix-default.css

Try specifying a width or top or left property for the div in question if you did not in the original code.
Position is commented out here. Maybe you didn't mean to.
.calendar-eightysix .body {
position: relative;
}
.calendar-eightysix .body .inner .container {
/*position: absolute;*/
left: 0;
}

Related

Select the second element of the second section with same name, CSS - NTH

In this example http://jsfiddle.net/rodrigolinkweb/k8qg14xL/ I need to select only "Container 12", how can I do this?
ps: note that both divs have the same class name "wrapper".
.container:nth-child(n+3){
background-color: gray;
color:white;
}
<div class="wrapper">
<div class="container">Container 1</div>
<div class="container">Container 2</div>
<div class="container">Container 3</div>
</div>
<br />
<div class="wrapper">
<div class="container">Container 11</div>
<div class="container">Container 12</div>
<div class="container">Container 13</div>
</div>
You can select them with the .wrapper class, like this
.wrapper:nth-of-type(2) .container:nth-child(2){
background-color: gray;
color:white;
}
<div class="wrapper">
<div class="container">Container 1</div>
<div class="container">Container 2</div>
<div class="container">Container 3</div>
</div>
<br />
<div class="wrapper">
<div class="container">Container 11</div>
<div class="container">Container 12</div>
<div class="container">Container 13</div>
</div>
If you want to select it from backwards you can use :nth-last-of-type() . Refer to the following fiddle here
No matter what content the .wrapper has :nth-child will select child based on its position where as :nth-of-type selects with appropriate attribute.
.wrapper:nth-of-type(2) .container:nth-child(2){
background-color: gray;
color:white;
}
<div class="wrapper">
<div class="container">Container 1</div>
<div class="container">Container 2</div>
<div class="container">Container 3</div>
</div>
<br />
<div class="wrapper">
Some link
<div class="container">Container 12</div>
<div class="container">Container 13</div>
</div>

CSS - Style only the 3rd and 5th h2 element

In the following HTML markup, I'm trying to style only the 3rd and 5th h2. But whatever I try it doesn't work.
<div class="row services">
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>First h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Second h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Third h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Fourth h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Fifth h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Sixth h2 title</h2>
</div>
</div>
</div>
Try this
.services div:nth-child(3) .service-card h2,
.services div:nth-child(5) .service-card h2 {
color: #f60;
}
<div class="row services">
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>First h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Second h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Third h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Fourth h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Fifth h2 title</h2>
</div>
</div>
<div class="col-md-6 col-lg-6 col-xl-6 ">
<div class="service-card">
<h2>Sixth h2 title</h2>
</div>
</div>
</div>

how to apply overflow x in row class

how to apply Row scroll overflow on x-axis direction for col-5, col-6, and col-7
<div class="container-fluid">
<div class="row">
<div class="col-4">col 1</div>
<div class="col-4">col 2</div>
<div class="col-4">col 3</div>
<div class="col-4">col 4</div>
<div class="col-4">col 5</div>
<div class="col-4">col 6</div>
<div class="col-4">col 7</div>
</div>
</div>
You need to add a specific class descriptor for those columns to give them additional styling
<div class="container-fluid">
<div class="row">
<div class="col-4">col 1</div>
<div class="col-4">col 2</div>
<div class="col-4">col 3</div>
<div class="col-4">col 4</div>
<div class="col-4 xoverflow">col 5</div>
<div class="col-4 xoverflow">col 6</div>
<div class="col-4 xoverflow">col 7</div>
</div>
</div>
app.css
.xoverflow {
overflow-x: auto;
}
I think you should use this:
.col-4:nth-child(5), .col-4:nth-child(6), .col-4:nth-child(7) {
overflow-x:scroll;
}

How to correctly position vertical oriented text on a div?

I have a table made by divs on bootstrap. I want on the first column the text be vertical (orientation -90deg). I was able to successfully turn the text but, if the the text is longer, it looses the position.
It always show up like on this screenshot: https://ibb.co/2s8dzyZ
I have tried several techniques found on the web but none seems to solve my problem.
.horizontal-pricing {
min-height: 250px;
position: relative;
}
.verticaltext {
transform: rotate(-90deg);
transform-origin: right, top;
-ms-transform: rotate(-90deg);
-ms-transform-origin: right, top;
-webkit-transform: rotate(-90deg);
-webkit-transform-origin: right, top;
position: absolute;
font-family: 'Montserrat-SemiBold', sans-serif;
font-size: 20px;
color: #3c99ef;
margin-top: 100px;
}
<div class="container purple-accent">
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Light 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Light 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Professional 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Professional 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Performance 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Performance 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
I want the text be vertically aligned on the middle of the white box and 20px from the left side.
Use writing-mode
.verticaltext {
writing-mode: vertical-lr;
transform: rotate(-180deg);
}
.row {
border: 1px solid green;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container purple-accent">
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Light 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Light 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Professional 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Professional 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Performance 1</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Performance 2</div>
</div>
</div>
<div class="col-sm-8 col-md-8">
<div>
<div>bla bla bla</div>
</div>
</div>
</div>
</div>
Codepen Demo
Do you really want to have <div class="col-sm-4 col-md-4"><div> closed without content, and then have <div class="pricing-box horizontal-pricing">closed after <div class="verticaltext">Light 1</div> and after that already close the row??
<div class="container purple-accent">
<div class="row">
<div class="pricing-box horizontal-pricing">
//THINK ABOUT THIS PART OUF YOUR CODE
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div>
<div class="verticaltext">Light 1</div>
</div>
</div>
By your formatting I think this would be more of what you want:
<div class="row">
<div class="pricing-box horizontal-pricing">
<div class="col-sm-4 col-md-4">
<div class="verticaltext">Light 1</div>
</div>
</div>
more div's inside row here

CSS how to refer to last div within multiple divs

I have the following HTML:
<div class="test">
<div class="inner">
<div class="pure-g">
<div class="pure-u-1-4">
<div class="spec__test">
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">
</div>
</div>
</div>
</div>
</div>
How can I possibly refer to ONLY the last spec__test div using CSS?
use :last-child
see: see: http://www.w3schools.com/cssref/sel_last-child.asp
.pure-g .pure-u-1-4:last-child .spec__test{
background-color:red;
}
<div class="test">
<div class="inner">
<div class="pure-g">
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
</div>
</div>
</div>
:last-of-type
.pure-g .pure-u-1-4:last-of-type {
background-color:red;
}
<div class="test">
<div class="inner">
<div class="pure-g">
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
<div class="pure-u-1-4">
<div class="spec__test">123
</div>
</div>
</div>
</div>
</div>

Resources