This is the html code for the POPUP. If I print this out in a foreach function then when I press the another popup that is create from the function the css will be link together so no matter which CSS I press it will only pop up the data for the first POPUP and the second pop up will stay the same. This is what I made:
So if I press the POPUP from course 1 then the pop up will works but if I press the POPUP from Couse 2 then the POPUP from Couse 1 will pop out instate of the course 2 popup the I pressed. Is there any way to make the css individual by calling out them one by one with foreach function because the number of the course is no specific sometime have more and sometime have less so is there any way to make every popup individual for each course.
<input type="checkbox" id="show" />
<label for="show" class="show-btn"> Join Meeting </label>
<div class="container-attendence">
<label for="show" class="close-btn fas fa-times" title="close"></label>
<div class="text">Attendence Detail</div>
</div>
This is the CSS code
.show-btn{
background: #fff;
padding: 10px 20px;
font-size: 20px;
font-weight: 500;
color: #3498db;
cursor: pointer;
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}
input[type="checkbox"]{
display: none;
}
.container-attendence{
display: none;
background: #fff;
width: auto;
padding: 30px;
box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
#show:checked ~ .show-btn{
display: none;
}
#show:checked ~ .container-attendence{
display: block;
}
.container-attendence .close-btn{
font-size: 18px;
cursor: pointer;
}
.container-attendence .close-btn:hover{
color: #3498db;
}
.container-attendence .text{
font-size: 35px;
font-weight: 600;
text-align: center;
}
.container-attendence form{
margin-top: -20px;
}
.container-attendence form .data{
height: auto;
width: 100%;
margin: 40px 0;
}
form .data label{
font-size: 18px;
}
.Attendence-btn{
background:none;
border:none;
}
Related
My question1.blade.php
.privew {
margin-bottom: 20px;
}
.questionsBox {
display: block;
border: solid 1px #e3e3e3;
padding: 10px 20px 0px;
box-shadow: inset 0 0 30px rgba(000,000,000,0.1), inset 0 0 4px rgba(255,255,255,1);
border-radius: 3px;
margin: 0 10px;
}.questions {
background: #007fbe;
color: #FFF;
font-size: 22px;
padding: 8px 30px;
font-weight: 300;
margin: 0 -30px 10px;
position: relative;
}
.questions:after {
background: #1d68a7 no-repeat left 0;
display: block;
position: absolute;
top: 100%;
width: 9px;
height: 7px;
content: '.';
left: 0;
text-align: left;
font-size: 0;
}
.questions:after {
left: auto;
right: 0;
background-position: -10px 0;
}
.questions:before, .questions:after {
background: black;
display: block;
position: absolute;
top: 100%;
width: 9px;
height: 7px;
content: '.';
left: 0;
text-align: left;
font-size: 0;
}
.answerList {
margin-bottom: 15px;
}
ol, ul {
list-style: none;
}
.answerList li:first-child {
border-top-width: 0;
}
.answerList li {
padding: 3px 0;
}
.answerList label {
display: block;
padding: 6px;
border-radius: 6px;
border: solid 1px #dde7e8;
font-weight: 400;
font-size: 13px;
cursor: pointer;
font-family: Arial, sans-serif;
}
input[type=checkbox], input[type=radio] {
margin: 4px 0 0;
margin-top: 1px;
line-height: normal;
}
.questionsRow {
background: #dee3e6;
margin: 0 -20px;
padding: 10px 20px;
border-radius: 0 0 3px 3px;
}
.button, .greyButton {
background-color: #f2f2f2;
color: #888888;
display: inline-block;
border: solid 3px #cccccc;
vertical-align: middle;
text-shadow: 0 1px 0 #ffffff;
line-height: 27px;
min-width: 160px;
text-align: center;
padding: 5px 20px;
text-decoration: none;
border-radius: 0px;
text-transform: capitalize;
}
.questionsRow span {
float: right;
display: inline-block;
line-height: 30px;
border: solid 1px #aeb9c0;
padding: 0 10px;
background: #FFF;
color: #007fbe;
}
<body>
<div class="container">
<div class="privew">
<div class="questionsBox">
<div class="questions"><h1>Something</h1></div>
<div class="answerList"><h3>You are only allowed to select one option from the given below question</h3></div>
<div class="questions"><h4>Question 1</h4></div>
<div class="questions"><h3>Section 1</h3></div>
<ul class="answerList">
<li>
<label>
<input type="radio" name="answerGroup" value="0" id="answerGroup_0">Yes</label>
</li>
<li>
<label>
<input type="radio" name="answerGroup" value="1" id="answerGroup_1">Rather yes</label>
</li>
<li>
</ul>
</div>
<div class="questionsBox">
<div class="questions"><h3>Section 2</h3></div>
<ul class="answerList">
<li>
<label>
<input type="radio" name="answerGroup" value="2" id="answerGroup_2">Yes</label>
</li>
<li>
<label>
<input type="radio" name="answerGroup" value="3" id="answerGroup_3">Rather yes</label>
</li>
</ul>
</div>
<div class="questionsRow">Next<span>1 from 20</span>Previous</div>
</div>
</div>
<script type="text/javascript">
</script>
</body>
Hello All,
I'm trying to make a test page where users will select one radio button option and submit all selections in one instance in order to store back into the database. Also, questions are on different pages so basically user can move back and forth in order to edit its selection. There are 20 questions in total. I am unable to understand where shall I put my array logic. My best guess would be in a TestController. Please drop your valuable answer.
P.S : I am a beginner in Web Development and recently started to work on a Personality assessment website Project. However, due to less experience, I am facing a lot of challenges to achieve building it.
This problem is from my Laravel 6.x Project.
I expect to get all the selections stored in an array and passed to the database where I can further process it.
As you can see from the picture above , my button will not line properly if they had content inside them.
Please enlighten me why
[ EDIT ]
CSS
.button {
position: relative;
background-color: #4CAF50;
border: 2px solid black;
color: #FFFFFF;
padding: 0;
width: 250px;
height: 200px;
text-align: center;
font-size: 20px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
margin-bottom: 2px;
}
and here is my button
<button class="button" id="Btn2"><span>(2)<br><?php
$id=$_GET['room'];
$day="02";
$month=date("m");
$year=date("Y");
( SQL retrieve data )
$i=1;
while ($reserve = mysqli_fetch_array($result2)){ echo $i.". ".$reserve['room_name']." ".$reserve['start_time']." - ".$reserve['end_time']."<br>";
$i++;
}
?> </span></button>
the answer would be css styling ,
which is
vertical-align:bottom;
I'm currently developing a wordpress theme with PHP, but my problem is with the css. I have tree divs, which i have inside a parent div. The parents div is by default 100%, so i want to specify the parent div (class: "single-general-sec1"). I've tried to calculate how wide the parent div should be in order for me to center it, but my calculations do not work. Please help.
Parent div should, by my calculation, be: 61% + 425px, but that dosen't work.
.single-general-sec1 {
margin-top: 150px;
margin-bottom: 150px;
height: auto;
width: calc(61% + 425px);
background-color: red;
}
.single-btype-div {
width: 250px;
display: inline-block;
float: left;
}
.single-gen-header {
font-size: 14px;
color: #D9D9D9;
font-family: "Roboto";
font-weight: 700;
text-transform: uppercase;
letter-spacing: 3px;
margin: 0;
width: auto;
}
.single-gen-desc {
color: #000;
font-family: "Roboto";
font-size: 28px;
font-weight: 300;
letter-spacing: 3px;
margin: 0;
width: auto;
margin-top: 5px;
}
.single-description-div {
width: 55%;
display: inline-block;
margin-left: 3%;
float: left;
}
.single-description-desc {
color: #000;
font-family: "Roboto";
font-size: 20px;
font-weight: 300;
letter-spacing: 1px;
margin: 0;
width: auto;
margin-top: 5px;
}
.single-live-button {
margin-top: 5px;
width: 175px;
height: 40px;
background-color: #8AA6B6;
border-radius: 8px;
border: none;
color: #fff;
font-size: 15px;
font-family: "Roboto";
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
}
.single-live-div {
width: 100px;
display: inline-block;
margin-left: 3%;
}
<div class="single-general-sec1">
<div class="single-btype-div">
<p class="single-gen-header"> - Typ av projekt </p>
<p class="single-gen-desc">
<?php the_field('project-type'); ?> </p>
</div>
<div class="single-description-div">
<p class="single-gen-header"> - Beskrivning </p>
<p class="single-description-desc">
<?php the_field('description'); ?> </p>
</div>
<div class="single-live-div">
<p class="single-gen-header"> - Se live </p>
<a href="<?php the_field('page-url') ?>"><button class="single-live-button">
Besök sida > </button></a>
</div>
</div>
You cannot center a div using % values for width. Also the calculation is wrong: 250px + 175px + 100px = 525px so, the parent div should be 525px in order to fit nested divs. But you should normalize HTML first. Or just use bootstrap.css.
Another thing. For center a div you can use display:inline-block then on his parent use text-align:center.
Or when you have a fixed width, margin:50px auto;
Is it possible to modify selectize.js? Instead of having a dropdown it will open a modal box for its options ? I am thinking of having a onfocus event then it will open that modal but prevent the dropdown. I'm just not sure how I can achieve it. and How I can populate the selectize once the modal options have been saved
It's usually not a good idea to customize a code library because you will not be able to upgrade to the next version. You are better off rolling your own solution using js and css. Actually making modal boxes is not that difficult, you just need to float a div at a higher z-index than the rest of the page, then put a transparent layer behind it to keep the user from clicking through to the background page. Here is some sample css and html I use to float a modal.
css
.BDT_Dialog_Layer {
position: absolute;
display: table;
top: 0px;
left: 0px;
height: 99%;
width: 99%;
}
.BDT_Dialog_Center {
position:fixed;
top:30%;
width:100%;
}
.BDT_Dialog_Decoration {
position:relative;
margin:0 auto;
text-align: center;
background-color: #ffffff;
display: table;
/* -- background-color: #DDDDDD;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#FFFFFF' , endColorstr='#BBBBBB');
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0.1, #FFFFFF), color-stop(1, #BBBBBB) );
background-image: -moz-linear-gradient( center top, #FFFFFF 10%, #BBBBBB 100% ); -- */
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
-khtml-border-radius: 15px;
border-radius: 15px;
-moz-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
-webkit-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
-khtml-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
}
html
<div id="dialogLayer" class="BDT_Dialog_Layer">
<div class="BDT_Dialog_Center">
<div class="BDT_Dialog_Decoration">
My stuff
</div>
</div>
here is the blocking layer css
div.BlockInteractionWithPage {
position: absolute;
top: 0px;
left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
background-color: #ffffff;
opacity: 0.0;
filter: alpha(opacity=0); /* filter:alpha for IE8 and earlier */
height: 100%;
width: 100%;
}
I don't even know if I'm doing this correctly, but I thought I'd ask to get a better opinion. Basically what I've done is this: created an information/navigation bar that expands depending on tab clicked by the user. What I'm trying to add is the functionality to expand a certain tab and be forwarded to it (like what this link would do: <a href="#contactus">) based on a link earlier on the same page. I can't seem to do it. The tab that should be opened is contained within a <ul><li> list and is hidden. I'll include the code:
<div id="tab1">
<ul class="tablinks">
<li><span>Check-Out</span></li>
<li><a onClick="show('tab2')">Payment</a></li>
</ul>
<table>
<tr>
<td><img alt=Check-Out src="http://link.com/images/checkouticon.gif" width=48px height=45></td>
<td>
<p style="font-family: arial,helvetica,sans-serif; font-size: 12px; padding-top: 5px; padding-bottom: 5px; padding-left: 5px">information</p>
</td>
</tr>
</table>
<div class="tabbase"></div>
</div>
<!-- tab 2 -->
<div id="tab2">
<ul class="tablinks">
<li><a onClick="show('tab1')">Check-Out</a></li>
<li><span>Payment</span></li>
</ul>
<table>
<tr>
<td vAlign=top align=left><img alt=Check-Out src="http://link.com/images/paypalicon.gif" width=48px height=45></td>
<td>
<p style="font-family: arial,helvetica,sans-serif; font-size: 12px; padding-top: 5px; padding-bottom: 5px; padding-left: 5px">information</p>
</td>
</tr>
</table>
<div class="tabbase"></div>
</div>
This is the CSS that affects it:
#tab1, #tab2, #tab3, #tab4, #tab5, #tab6, #tab7 { font-family: trebuchet ms, Helvetica, sans-serif; height:550px;}
#tab1, #tab2, #tab3, #tab4, #tab5, #tab6, #tab7 {
width: 750px;
font-family: "trebuchet ms", tahoma, verdana, sans-serif;
font-size: 11px;
}
#tab2, #tab3, #tab4, #tab5, #tab6, #tab7 {
display: none;
}
ul.tablinks {
width: 600px;
margin: 20px 0px 0px 0px;
padding: 0px;
list-style: none;
height: 23px;
display: block;
cursor: pointer;
border-bottom: 0px solid #fff;
}
ul.tablinks li {
display: inline;
float: left;
margin: 0px 4px 0px 0px;
padding: 0px;
}
ul.tablinks li a, ul.tablinks li a:visited {
display: block;
width: 79px;
height: 23px;
line-height: 23px;
text-align: center;
text-decoration: none;
font-weight: normal;
font-size: 11px;
background: url(http://link.com/images/tabout3.gif);
color: #ffffff;
}
ul.tablinks li span {
display: block;
width: 79px;
height: 23px;
line-height: 23px;
text-align: center;
text-decoration:underline;
font-weight: normal;
font-size: 11px;
}
ul.tablinks li a:hover,
ul.tablinks li a.hover {
background: url(http://link.com/images/tabover.gif);
color: #000;
}
ul.tablinks li a:active{
text-decoration:underline;
}
div.tabbase {
display: block;
height: 3px;
line-height: 8px;
font-size: 0px;
}
div.tabbase {
background: url(http://link.com/images/boxbase3.gif);
}
And last but not least this is the code that is within a .php external file that affects the hidden aspect of the tabs:
function show(id)
{
checkseo()
if (err == "1"){return;}
hide()
if(ie5 || ns6){
//document.getElementById(id).style.display = "inline";
document.getElementById(id).style.display = "block";
}
}
function hide(){
if(ie5 || ns6){
document.getElementById('tab1').style.display = "none";
document.getElementById('tab2').style.display = "none";
document.getElementById('tab3').style.display = "none";
document.getElementById('tab4').style.display = "none";
document.getElementById('tab5').style.display = "none";
document.getElementById('tab6').style.display = "none";
document.getElementById('tab7').style.display = "none";
}
}
So the idea is to be able to insert a link earlier in the document to open the "Payment" tab. I tried something like this: Payment Information and changed the tags for the list to: <li><span name="payments">Payments</span></li>. This didn't work unless I had already clicked on the "Payments" tab and opened it and then clicked on the link. Then my screen would scroll down and focus on that area. Is there a way to have the screen scroll down and view the <span> without having to 'open' it first?
Thanks for all your help in advance. And I should note, that while I do have some ability with HTML, Javascript, and PHP, I'm still learning and don't know all of the best ways of doing things.
The best (and easiest) way to code this is to use a JS framework like jQuery. It'll help tremendously in normalizing the browser differences.
But if that's not an option, let's try to fix the existing code. Payment Information will jump to an element with the id="payments", not name. Once you fix that, add an onClick="show('tab2')" to that <a>.
In the show function, what is the point of this code if(ie5 || ns6)? This is basically saying, if it's IE5 or Netscape6, then show the element (assuming the variable ie5 and ns6 are set properly somewhere of course). Try removing this, I don't think you need it.