I want the avatar to fill the entire circle. it should be increased, but I do not know how.
Do position: absolute and remont, its position left top, but she's out of the circle.
.photo {
display: inline-block;
width: 62px;
height: 62px;
box-sizing: border-box;
background: #f5f4f7;
border-radius: 50%;
margin-right: 17px;
padding-top: 5px;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.photo img {
-o-object-fit: contain;
object-fit: contain;
width: 100%;
height: 100%;
-o-object-position: 50% 50%;
object-position: 50% 50%;
}
<div class="photo">
<img src="https://i.pinimg.com/originals/bc/33/b5/bc33b5e3f3604819db0e4ca66a989c9e.jpg">
</div>
A simplified version:
.photo {
display: inline-block;
width: 62px;
height: 62px;
box-sizing: border-box;
background: #f5f4f7;
border-radius: 50%;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.photo img {
display: block;
width: 100%;
height: auto;
transform: translateY(-50%); /*center photo*/
margin-top: 50%; /*vertically with these 2 lines*/
}
<div class="photo">
<img src="https://i.pinimg.com/originals/bc/33/b5/bc33b5e3f3604819db0e4ca66a989c9e.jpg">
</div>
Try setting the image as a background as shown:
.photo {
display: inline-block;
width: 62px;
height: 62px;
box-sizing: border-box;
background: #f5f4f7;
border-radius: 50%;
margin-right: 17px;
padding-top: 5px;
overflow: hidden;
background: url(https://i.pinimg.com/originals/bc/33/b5/bc33b5e3f3604819db0e4ca66a989c9e.jpg) no-repeat center;
background-size: cover;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
<div class="photo">
</div>
1. Remove padding-top: 5px; from .photo.
2. Remove everything from .photo img except height and width.
.photo {
display: inline-block;
width: 62px;
height: 62px;
box-sizing: border-box;
background: #f5f4f7;
border-radius: 50%;
margin-right: 17px;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.photo img {
width: 100%;
height: 100%;
}
<div class="photo">
<img src="https://i.pinimg.com/originals/bc/33/b5/bc33b5e3f3604819db0e4ca66a989c9e.jpg">
</div>
Related
I've been creating a checkbox that has a custom background image. I want to hide the checkbox, but whenever I do I am unable to check it.
HTML:
<div class="arrow">
<label for="togglearrow"></label>
<input type='checkbox' id="togglearrow"/>
<div class="arrowmenu"></div>
</div>
CSS:
#togglearrow {
display: none;
cursor: pointer;
}
.arrow {
position: absolute;
display: block;
background: url('arrow.png') no-repeat;
background-size: 65%;
height: 35px;
bottom: 0;
}
.arrowmenu {
position: absolute;
background: url('test.png') no-repeat;
background-size: 65%;
height: 35px;
bottom: 0;
right: 20px;
}
label[for="togglearrow"] {
display: block;
cursor: pointer;
}
#togglearrow:checked + .arrowmenu {
display: block;
bottom: 0;
left: 50px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
I expect that the checkbox will be hidden and can still click on "tasks.png" to check the box, however, it results in the checkbox not being able to be checked.
Your <label> element doesn't have any dimensions.
Also, I am unsure which element tasks.png is referring to.
#togglearrow {
display: none;
}
.arrow {
position: relative;
display: block;
background: url('https://unsplash.it/100') no-repeat;
background-size: 65%;
height: 35px;
bottom: 0;
}
.arrowmenu {
position: absolute;
background: url('https://unsplash.it/300') no-repeat;
background-size: 65%;
height: 35px;
bottom: 0;
right: 20px;
}
label[for="togglearrow"] {
display: block;
cursor: pointer;
width: 40px;
height: 100%;
border: 1px solid yellow;
}
#togglearrow:checked + .arrowmenu {
display: block;
bottom: 0;
left: 50px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
<div class="arrow">
<label for="togglearrow"></label>
<input type='checkbox' id="togglearrow"/>
<div class="arrowmenu"></div>
</div>
I tried a lot of solutions here at stackoverflow but nothing is working.
a.buttongc {
border-radius: 5px;
background: #f5b220;
color: #fff;
font-size: 17px;
height: 44px;
line-height: 42px;
color: #fff;
text-decoration: none;
text-align: center;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
white-space: nowrap;
margin: 10px;
text-overflow: ellipsis;
font-family: inherit;
cursor: pointer;
width: 100%;
overflow: hidden;
display: block;
}
.gc-button-center {
position: fixed;
left: 0;
right: 0;
display: block;
width: 100%;
bottom: 50px;
z-index: 999999999;
}
<div class="gc-button-center">
test
</div>
I want to have a margin left and right but it is only working at the left side and the button goes over the scrollbar. any solution?
Nothing fancy needed. Just remove your width: 100% If display is block, and width is not supplied, the width will auto size to fit the parent.
a.buttongc{
border-radius: 5px;
background: #f5b220;
color: #fff;
font-size: 17px;
height: 44px;
line-height: 42px;
color: #fff;
text-decoration: none;
text-align: center;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
white-space: nowrap;
margin:10px;
text-overflow: ellipsis;
font-family: inherit;
cursor: pointer;
overflow:hidden;
display: block;
}
.gc-button-center{
position:fixed;
left:0;
right:0;
display:block;
width: 100%;
bottom: 50px;
z-index:999999999;
}
<div class="gc-button-center">
test
</div>
Just change width: calc(100% - 20px); for subtract margin
a.buttongc{
border-radius: 5px;
background: #f5b220;
color: #fff;
font-size: 17px;
height: 44px;
line-height: 42px;
color: #fff;
text-decoration: none;
text-align: center;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
white-space: nowrap;
margin:10px;
text-overflow: ellipsis;
font-family: inherit;
cursor: pointer;
width: 100%;
overflow:hidden;
display: block;
}
.gc-button-center{
position:fixed;
left:0;
right:0;
display:block;
width: calc(100% - 20px);
bottom: 50px;
z-index:999999999;
}
<div class="gc-button-center">
test
</div>
I've tried re-using some method showing custom alert on a web page. For some reason the code works properly on old pages but not on my new one.
Fiddle
.noPopup {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.noPopup .np1 {
text-align: center;
height: 100%;
}
.noPopup .np1:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
.noPopup .np2 {
display: inline-block;
vertical-align: middle;
}
.noPopup .np4 {
position: relative;
}
.noPopup .noPclose {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.noPopup .nt1 {
position: absolute;
left: 40px;
top: 25px;
font-family: Arial;
font-size: 18px;
font-weight: bold;
color: white;
}
.noPopup .nt2 {
position: absolute;
left: 110px;
top: 23px;
font-family: Calibri;
font-size: 18px;
color: white;
}
.noPopup .nt22 {
position: absolute;
left: 25px;
top: 23px;
font-family: Calibri;
font-size: 18px;
color: white;
}
.noPopup .ndel {
display: none;
position: absolute;
left: 95px;
top: 20px;
background-color: #9f7709;
width: 2px;
height: 25px;
}
.noPopup .ndel2 {
position: absolute;
left: 95px;
top: 20px;
background-color: #9f7709;
width: 2px;
height: 25px;
}
.noPopup .btnl {
background-image: url('../Images/noPopup/btnl.png');
position: absolute;
top: 21px;
right: 120px;
width: 8px;
height: 21px;
cursor: pointer;
}
.noPopup .btnr {
background-image: url('../Images/noPopup/btnr.png');
position: absolute;
top: 21px;
right: 80px;
width: 8px;
height: 21px;
cursor: pointer;
}
.noPopup .btnClose {
background-image: url('../Images/noPopup/btnClose.png');
position: absolute;
top: 15px;
right: 20px;
width: 36px;
height: 36px;
cursor: pointer;
}
.noPopup .n123 {
position: absolute;
top: -2px;
width: 100%;
}
.noPopup .n789 {
position: absolute;
bottom: -2px;
width: 100%;
}
.noPopup .nc2 {
background-color: #1c1c1c;
border: solid 1px #9f7709;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.noPopup .nc22 {
background-color: #1c1c1c;
border: solid 1px #9f7709;
/*display: table-cell;
vertical-align: middle;*/
}
.noPopup .nc23 {
padding: 2px;
display: table-cell;
vertical-align: middle;
}
.noPopup .nc2if {
background-color: #1c1c1c;
border: solid 1px #9f7709;
max-height: 100%;
max-width: 100%;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
.noPopup .nc2im {
max-height: 100%;
max-width: 100%;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
.noPopup .nc {
color: white;
margin: 2px 3px 2px 3px;
background-color: #222222;
padding: 60px 20px 20px 20px;
background-image: url('../Images/noPopup/gex.png');
background-repeat: no-repeat;
background-position: left -60px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.noPopup .n1 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/1.png');
float: left;
}
.noPopup .n2 {
margin-left: 8px;
margin-right: 8px;
height: 8px;
background-image: url('../Images/noPopup/2.png');
background-repeat: repeat-x;
background-position: center 2px;
}
.noPopup .n3 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/3.png');
float: right;
}
.noPopup .n7 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/7.png');
float: left;
}
.noPopup .n8 {
height: 8px;
margin-left: 8px;
margin-right: 8px;
background-position: bottom;
background-image: url('../Images/noPopup/8.png');
background-repeat: repeat-x;
}
.noPopup .n9 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/9.png');
float: right;
}
<div>
<div class="noPopup" style="z-index:101;width:800px;height:0%;top:200px;left:74px">
<div class="np1">
<div class="np2">
<div class="noPclose"></div>
<div class="np4">
<div class="btnClose" onclick="destroyLastMessage();"></div>
<div style="left:24px" class="nt1">Title</div>
<div class="nt22"></div>
<div class="ndel"></div>
<div class="n123">
<div class="n1"></div>
<div class="n3"></div>
<div class="n2"></div>
</div>
<div class="n789">
<div class="n7"></div>
<div class="n9"></div>
<div class="n8"></div>
</div>
<div class="nc">
<div style="text-align:left">
Text
<br>
<table width="100%">
<tbody>
<tr>
<td width="100%" align="right"><span onclick="remindPassword(document.getElementById('txtForgotPasswordName').value)" class="button">Button</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
The issue is:
Although div's width is set to 800px, it's being ignored.
Any ideas why?
Please remove .noPopup .np2 { display: inline-block: }
You need to change the CSS of the class .noPopup .np2 to be display:block; instead of display:inline-block;
.noPopup .np2 {
display: block;
vertical-align: middle;
}
Here is the JSFiddle
So all this answers just say do this and don't explain anything.
the issue is you are using inline-block in child .np2 which won't have any width by default, so either:
you remove the display:inline-block (which will get it back to default display:block) and then this have width
or
you can just set some width on that .np2
Note: Don't use inline styles
.noPopup {
position: fixed;
height: 100%;
top: 0;
left: 0;
z-index: 101;
width: 800px;
/* top: 200px;*/
left: 74px
}
.noPopup .np1 {
text-align: center;
height: 100%;
}
.noPopup .np1:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
.noPopup .np2 {
display: inline-block;
vertical-align: middle;
width: 100%
}
.noPopup .np4 {
position: relative;
}
.noPopup .noPclose {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.noPopup .nt1 {
position: absolute;
left: 40px;
top: 25px;
font-family: Arial;
font-size: 18px;
font-weight: bold;
color: white;
}
.noPopup .nt2 {
position: absolute;
left: 110px;
top: 23px;
font-family: Calibri;
font-size: 18px;
color: white;
}
.noPopup .nt22 {
position: absolute;
left: 25px;
top: 23px;
font-family: Calibri;
font-size: 18px;
color: white;
}
.noPopup .ndel {
display: none;
position: absolute;
left: 95px;
top: 20px;
background-color: #9f7709;
width: 2px;
height: 25px;
}
.noPopup .ndel2 {
position: absolute;
left: 95px;
top: 20px;
background-color: #9f7709;
width: 2px;
height: 25px;
}
.noPopup .btnl {
background-image: url('../Images/noPopup/btnl.png');
position: absolute;
top: 21px;
right: 120px;
width: 8px;
height: 21px;
cursor: pointer;
}
.noPopup .btnr {
background-image: url('../Images/noPopup/btnr.png');
position: absolute;
top: 21px;
right: 80px;
width: 8px;
height: 21px;
cursor: pointer;
}
.noPopup .btnClose {
background-image: url('../Images/noPopup/btnClose.png');
position: absolute;
top: 15px;
right: 20px;
width: 36px;
height: 36px;
cursor: pointer;
}
.noPopup .n123 {
position: absolute;
top: -2px;
width: 100%;
}
.noPopup .n789 {
position: absolute;
bottom: -2px;
width: 100%;
}
.noPopup .nc2 {
background-color: #1c1c1c;
border: solid 1px #9f7709;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.noPopup .nc22 {
background-color: #1c1c1c;
border: solid 1px #9f7709;
/*display: table-cell;
vertical-align: middle;*/
}
.noPopup .nc23 {
padding: 2px;
display: table-cell;
vertical-align: middle;
}
.noPopup .nc2if {
background-color: #1c1c1c;
border: solid 1px #9f7709;
max-height: 100%;
max-width: 100%;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
.noPopup .nc2im {
max-height: 100%;
max-width: 100%;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-o-user-select: none;
}
.noPopup .nc {
color: white;
margin: 2px 3px 2px 3px;
background-color: #222222;
padding: 60px 20px 20px 20px;
background-image: url('../Images/noPopup/gex.png');
background-repeat: no-repeat;
background-position: left -60px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.noPopup .n1 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/1.png');
float: left;
}
.noPopup .n2 {
margin-left: 8px;
margin-right: 8px;
height: 8px;
background-image: url('../Images/noPopup/2.png');
background-repeat: repeat-x;
background-position: center 2px;
}
.noPopup .n3 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/3.png');
float: right;
}
.noPopup .n7 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/7.png');
float: left;
}
.noPopup .n8 {
height: 8px;
margin-left: 8px;
margin-right: 8px;
background-position: bottom;
background-image: url('../Images/noPopup/8.png');
background-repeat: repeat-x;
}
.noPopup .n9 {
width: 8px;
height: 8px;
background-image: url('../Images/noPopup/9.png');
float: right;
}
<div>
<div class="noPopup">
<div class="np1">
<div class="np2">
<div class="noPclose"></div>
<div class="np4">
<div class="btnClose" onclick="destroyLastMessage();"></div>
<div style="left:24px" class="nt1">Title</div>
<div class="nt22"></div>
<div class="ndel"></div>
<div class="n123">
<div class="n1"></div>
<div class="n3"></div>
<div class="n2"></div>
</div>
<div class="n789">
<div class="n7"></div>
<div class="n9"></div>
<div class="n8"></div>
</div>
<div class="nc">
<div style="text-align:left">
Text
<br>
<table width="100%">
<tbody>
<tr>
<td width="100%" align="right"><span onclick="remindPassword(document.getElementById('txtForgotPasswordName').value)" class="button">Button</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Project
adding circles that expands when users hover, on an image so it adds interesting animation to it.
Problem
After I was done I realized that depending on the screen display used, the elements (red balls) I put over the image are in different locations. How can I do this so it works on all devices except mobile.
You will get a better idea of what im doing when you see the demo
HTML
<div><img class="tree" title="source: imgur.com" src="http://i.imgur.com/1dDCOyq.png" alt="" />
<div class="circle-top-left">
<div class="circle__wrapper">
<div class="circle__content">
<p class="para">This is where sentence goes</p>
consulting 1
</div>
</div>
</div>
<div class="circle-top-right">
<div class="circle__wrapper">
<div class="circle__content">
<p class="para">This is where sentence goes</p>
consulting 3
</div>
</div>
</div>
<div class="circle-bot-right">
<div class="circle__wrapper">
<div class="circle__content">
<p class="para">This is where sentence goes</p>
consulting
</div>
</div>
</div>
<div class="circle-bot-left">
<div class="circle__wrapper">
<div class="circle__content">
<p class="para">This is where sentence goes</p>
consulting 4
</div>
</div>
</div>
</div>
CSS
.footer_top_holder {
border-top: #17171A solid 8px;
box-shadow: none;
}
/* Home page tree image CSS */
* {
box-sizing: border-box;
}
.tree {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 50px;
margin-top: 50px;
}
.circle-top-left {
cursor: default;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
font-size: 9px;
-webkit-backface-visibility: hidden;
position: absolute;
background: #b20312;
top: 103.5px;
left: 26.3%;
width: 60px;
height: 60px;
border-radius: 50%;
transition: all .5s ease-in-out;
margin: 0 0;
text-align: center;
}
.circle-top-left:hover {
width: 200px;
height: 200px;
padding: 2.5em;
color: transparent;
left: 160px;
top: 45px;
}
.circle-top-right {
cursor: default;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
font-size: 9px;
-webkit-backface-visibility: hidden;
position: absolute;
background: #b20312;
top: 49.5px;
left: 52.5%;
width: 60px;
height: 60px;
border-radius: 50%;
transition: all .5s ease-in-out;
margin: 0 0;
text-align: center;
}
.circle-top-right:hover {
width: 200px;
height: 200px;
padding: 2.5em;
color: transparent;
left: 49%;
top: 35px;
}
.circle-bot-right {
cursor: default;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
font-size: 9px;
-webkit-backface-visibility: hidden;
position: absolute;
background: #b20312;
top: 267.5px;
left: 75%;
width: 60px;
height: 60px;
border-radius: 50%;
transition: all .5s ease-in-out;
margin: 0 0;
text-align: center;
}
.circle-bot-right:hover {
width: 200px;
height: 200px;
padding: 2.5em;
color: transparent;
left: 74%;
top: 215px;
}
.circle-bot-left {
cursor: default;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
font-size: 9px;
-webkit-backface-visibility: hidden;
position: absolute;
background: #b20312;
top: 379px;
left: 19.6%;
width: 60px;
height: 60px;
border-radius: 50%;
transition: all .5s ease-in-out;
margin: 0 0;
text-align: center;
}
.circle-bot-left:hover {
width: 200px;
height: 200px;
padding: 2.5em;
color: transparent;
left: 8%;
top: 320px;
}
.circle__wrapper {
display: table;
width: 100%;
height: 100%;
}
.title_subtitle_holder {
display: block;
padding: 30px 0;
position: relative;
}
.circle__content {
display: table-cell;
padding: 1em;
vertical-align: middle;
}
.para {
line-height: 25px;
display: none;
font-size: 15px;
color: white;
text-align: center;
vertical-align: middle;
}
.circle-top-right:hover .para,
.circle-bot-right:hover .para,
.circle-top-left:hover .para,
.circle-bot-left:hover .para {
display: block;
}
.circle-top-right:hover span,
.circle-bot-right:hover span,
.circle-top-left:hover span,
.circle-bot-left:hover span {
display: none;
}
Demo
You can get your element circles to start out on top of the image's circles by replacing your hard-coded left styles with the following:
.circle-top-left {
left: calc(50% - 260px);
}
.circle-top-right {
left: calc(50% + 29px);
}
.circle-bot-right {
left: calc(50% + 275px);
}
.circle-bot-left {
left: calc(50% - 335px);
}
CodePen 1
If you want the circles to always expand in place, replace your hard-coded left and top hover styles with the following:
.circle-top-left:hover, .circle-top-right:hover,
.circle-bot-right:hover, .circle-bot-left:hover {
transform: translate(-90px, -90px);
}
CodePen 2
The issue is documented in this JSFiddle:
http://jsfiddle.net/sawaira/j62309fx/39/
<div style="height:700px; width:1500px;">
<div id="loading-image">Stabilizing iteration (90% done)</div>
<div id="kl" style="position:absolute;height:700px; width:1200px;float:left;border: 2px solid
#0094ff;overflow:auto">
</div>
<div style="height:100%; width:300px;float:right;border: 2px solid #0094ff;border-radius:5px">
<div style="height:100%; width:100%;">
<table style="width:100%;">
<tr>
<td colspan="4">
<div class="containerChart2">
<div class="headerChartControl">
<span>My Team(s):</span>
</div>
<div id="filterHolder1" class="listControl">
<form id="formUserListObject">
<input type="checkbox" name="userSelection" id="{{id}}"
onchange="checkBoxSelected(id,false)" class="css-checkbox"/>
<label for="{{id}}" class="css-label">
{{userName}}
</label>
</form>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="4">
<div class="containerChart2">
<div class="headerChartControl">
<span>Find Other Team(s):</span>
</div>
<div class="contentSearch">
<!-- This is the HTML element that will be used to render the KeyLines
component -->
<form id="formSearch" class="formSearch">
<input type="search" id="searchBox" />
</form>
<!--label id="headervalue2">Search Results:</label-->
<div id="filterHolder2" class="listControl"></div>
</div>
</div>
</td>
</tr>
<td colspan="4">
<div class="headerChartControl">
<input type="button" onclick="document.getElementById('loading-
image').style.display ='block'" value="Show"/>
<input type="button" onclick="document.getElementById('loading-image').style.display ='none'" value="Hide"/>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
#formUserListObject {
font-size: x-small;
}
#tab0 {
top: 50px;
}
#page {
display: none;
}
#loading-image {
position:absolute;
top: 50%;
left:50%;
z-index:1;
font-size: 20px;
color: red;
}
.overallDiv {
height: 100%;
width: 100%;
background-color: #ff6a00;
}
.myDiv {
height: 100%;
width: 100%;
background-color: #b6ff00;
}
.formClass {
}
.listControl {
padding-top: 5px;
padding-right: 15px;
padding-bottom: 5px;
padding-left: 15px;
border: 2px solid #0094ff;
height: 100px;
overflow-y: scroll;
}
.paddingControl {
padding-top: 5px;
padding-right: 10px;
padding-bottom: 5px;
padding-left: 10px;
}
.slider {
padding-top: 5px;
padding-right: 15px;
padding-bottom: 5px;
padding-left: 15px;
background-color: #00ff90;
}
input[type=checkbox].css-checkbox {
position:absolute;
z-index: -1000;
left: -1000px;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
padding: 0;
margin: -1px;
border: 0;
}
input[type=checkbox].css-checkbox + label.css-label {
padding-left: 20px;
height: 15px;
display: inline-block;
line-height: 15px;
background-repeat: no-repeat;
background-position: 0 0;
font-family: Arial;
font-size: 10px;
cursor: pointer;
}
input[type=checkbox].css-checkbox:checked + label.css-label {
background-position: 0 -15px;
}
label.css-label {
background-image: url
(http://csscheckbox.com/checkboxes/u/csscheckbox_845137eccd6f9ac2355055adf283a248.png);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
input[type=checkbox].css-checkbox + label.css-labelMinus {
padding-left: 20px;
height: 15px;
display: inline-block;
line-height: 15px;
background-repeat: no-repeat;
background-position: 0 -15px;
font-family: Arial;
font-size: 10px;
cursor: pointer;
}
input[type=checkbox].css-checkbox:checked + label.css-labelMinus {
background-position: 0 -15px;
}
label.css-labelMinus {
background-image: url
(http://csscheckbox.com/checkboxes/u/csscheckbox_845137eccd6f9ac2355055adf283a248.png);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.headerChartControl {
background-color: #9ed1f6;
cursor: pointer;
font-family: Arial;
font-size: 12px;
font-weight: bold;
width: 100%;
}
.contentSearch {
width: 100%;
}
.listControl {
border: 1px solid #0094ff;
height: 100px;
overflow-y: scroll;
}
.searchText {
font-family: Arial;
font-size: 10px;
}
.formSearch {
width: 100%;
display: inline-block;
padding-bottom: 2px;
}
input[type="search"] {
background: white url
(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAIVBMVEW/v7+/v78AAAC/v7+/v7+/v7+/v7+/v7+/v
7+/v7+/v79QUkolAAAAC3RSTlOLYAAJeoMjRhpOcbsbtd4AAABJSURBVHjaVc1JDsAgDATB9uAF8v8Hx0QcSN9KssZI5eClDj18PRsFlmlQDcfUG
d6A3EgYP1xncQ+sa5qYOk9jRQt1Y0izhU5bL2o2AW3ZQKeJAAAAAElFTkSuQmCC) 10px 6px no-repeat;
height: 20px;
border: 1px solid #0094ff;
width: 100%;
}
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
}
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: searchfield-decoration;
}
I have added 2 buttons to show and hide the Loading text. I want the "Loading Text" itself to always be positioned in the middle of the "kl" div, even on scroll/resizing of window.
Even with top/left = 50% and position=absolute, the text is not centered (mainly on resizing). What do I need to change to get it centered properly.
Check this :http://jsfiddle.net/8b6zk90c
just i added position:relative to outer and inner div to position:fixed
Hi You can add two properties to achieve text in middle of your kl DIV
text-align: center;
line-height: 700px;
It will do the magic