Two buttons interfering? - php

I'm working on a webpage but i'm a designer not a developer, I have a problem with my buttons. Here's the code`
<style>
#chat {
position:fixed;
bottom:0;
right:0;
background-color:#000;
width:300px;
padding:10px;
color:white;
display:block;
z-index:99999;
}
#chatbtn {
background:#666;
width:310px;
position:fixed;
bottom:0;
right:0;
z-index:14;
-webkit-border-top-left-radius:5px;
-moz-border-radius-topleft:5px;
border-top-left-radius:5px;
background:#333;
cursor:pointer;
}
#chatbtn h3 {
background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);
background-repeat:no-repeat;
background-position:-5px -574.5px;
margin:0;
font-size:20px;
padding-left:40px;
line-height:2.2;
color:#fff;
font-weight:700;
}
#box {
position:relative;
width:890px;
height:100px;
top:130px;
z-index:14;
margin:0 auto;
}
#box .left_part {
width:810px;
height:100px;
float:left;
}
#box .left_part .top {
width:790px;
height:54px;
margin-left:10px;
}
#box .left_part .bottom {
width:810px;
height:45px;
}
#box .right_part {
width:80px;
height:100px;
float:right;
}
.media_icons {
width:190px;
height:45px;
display:inline-block;
float:left;
text-align:center;
}
.song_titel {
width:510px;
height:45px;
display:inline-block;
float:left;
text-align:center;
}
.social_icons {
width:150px;
height:45px;
display:inline-block;
float:right;
text-align:center;
margin-top:-40px;
}
.twitter a {
background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);
background-repeat:no-repeat;
background-position:-10px -480px;
width:32px;
height:32px;
float:right;
margin:10px 7px 10px 0;
}
.facebook a {
background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);
background-repeat:no-repeat;
background-position:-10px -532px;
width:32px;
height:32px;
float:right;
margin:10px 7px 10px 0;
}
.twitter a:hover {
background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);
background-repeat:no-repeat;
width:32px;
background-position:-10px -480px;
height:32px;
float:right;
margin:10px 9px 10px 0;
}
.facebook a:hover {
background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);
background-repeat:no-repeat;
width:32px;
background-position:-10px -532px;
height:32px;
float:right;
margin:10px 9px 10px 0;
}
#-webkit-keyframes NAME-YOUR-ANIMATION {
0% {
opacity:0;
}
100% {
opacity:1;
}
}
#-moz-keyframes NAME-YOUR-ANIMATION {
0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
#-o-keyframes NAME-YOUR-ANIMATION {
0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
#keyframes NAME-YOUR-ANIMATION {
0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
.black_overlay {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: .8;
opacity: .80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
bottom: 6%;
right: 0;
padding: 1px;
border: 1px solid black;
background-color: white;
z-index: 1002;
overflow: auto;
}
#tunein {
float: right;
margin: 3px 0px 0 -1px;
margin-top:15px !important;
}
#tunein img {
margin: 3px;
opacity: 0.8;
}
#tunein img:hover {
opacity: 1;
}
.song_titel .current_show, .song_titel .current_song {
font-size: 15px;
color: #FD0E62;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
height: 20px;
line-height: 20px;
}
.song_titel .current_show span, .song_titel .current_song span {
font-size: 12px;
color: white;
line-height: 22px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: normal;
}
</style>
<script>
function show_proto() {
if ($("#chat").css('display') == 'none') {
$("#chat").show();
} else {
$("#chat").hide();
}
}
</script>
<div id="chat" style="z-index:1999999;display:none;">
<iframe id="chat_frame" src="http://www.muzik.gr/chat/index_mini.php" width="470" height="540" name="chat">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
<div style="z-index: 1000000;" id="chatbtn" onclick="show_proto();">
<h3>Chatbox</h3>
</div>
<div>
<style>#contactus{position:fixed;bottom:0;left:0;background-color:#000;width:300px;padding:10px;color:white;display:block;z-index:99999;}#contactusbtn{background:#666;width:310px;position:fixed;bottom:0;left:0;z-index:14;-webkit-border-top-right-radius:5px;-moz-border-radius-topright:5px;border-top-left-radius:5px;background:#333;cursor:pointer;}#contactusbtn h3{background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);background-repeat:no-repeat;background-position:-5px -574.5px;margin:0;font-size:20px;padding-left:40px;line-height:2.2;color:#fff;font-weight:700;}#box{position:relative;width:890px;height:100px;top:130px;z-index:14;margin:0 auto;}#box .right_part{width:810px;height:100px;float:left;}#box .right_part .top{width:790px;height:54px;margin-left:10px;}#box .right_part .bottom{width:810px;height:45px;}#box .right_part{width:80px;height:100px;float:left;}.media_icons{width:190px;height:45px;display:inline-block;float:left;text-align:center;}.song_titel{width:510px;height:45px;display:inline-block;float:left;text-align:center;}.social_icons{width:150px;height:45px;display:inline-block;float:left;text-align:center;margin-top:-40px;}.twitter a{background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);background-repeat:no-repeat;background-position:-10px -480px;width:32px;height:32px;float:left;margin:10px 7px 10px 0;}.facebook a{background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);background-repeat:no-repeat;background-position:-10px -532px;width:32px;height:32px;float:left;margin:10px 7px 10px 0;}.twitter a:hover{background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);background-repeat:no-repeat;width:32px;background-position:-10px -480px;height:32px;float:left;margin:10px 9px 10px 0;}.facebook a:hover{background-image:url(http://www.muzik.gr/wp-content/themes/theme18309/images/spriteme1.png);background-repeat:no-repeat;width:32px;background-position:-10px -532px;height:32px;float:left;margin:10px 9px 10px 0;}#-webkit-keyframes NAME-YOUR-ANIMATION1{0%{opacity:0;}100%{opacity:1;}}#-moz-keyframes NAME-YOUR-ANIMATION1{0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
#-o-keyframes NAME-YOUR-ANIMATION1 {
0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
#keyframes NAME-YOUR-ANIMATION1 {
0 {
opacity: 0;
}
100% {
opacity: 1;
}
}
.black_overlay {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: .8;
opacity: .80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
bottom: 6%;
left: 0;
padding: 1px;
border: 1px solid black;
background-color: white;
z-index: 1002;
overflow: auto;
}
#tunein {
float: left;
margin: 3px 0px 0 -1px;
margin-top:15px !important;
}
#tunein img {
margin: 3px;
opacity: 0.8;
}
#tunein img:hover{
opacity: 1;
}
.song_titel .current_show, .song_titel .current_song {
font-size: 15px;
color: #FD0E62;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: bold;
height: 20px;
line-height: 20px;
}
.song_titel .current_show span, .song_titel .current_song span {
font-size: 12px;
color: white;
line-height: 22px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-weight: normal;
}
</style>
<script>
function show_proto() {
if ($("#contactus").css('display') == 'none') {
$("#contactus").show();
}
else
{
$("#contactus").hide();
}
}
</script>
<div id="contactus" style="z-index:1000000;display:none;">
<iframe id="contactus_frame" src="http://www.muzik.gr/contactus/contactus.php" width="290" height="600" name="contactus">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
<div style="z-index: 1000000;" id="contactusbtn" onclick="show_proto();">
<h3>Contact Us</h3>
</div>
</div>
`
The Chat box button was working before i added the contact us button. after i added the contact us button it brings the contact us button frame

Thanks for a comment from #TamilSelvan! i could solve my problem!
The problem was that both of the buttons are calling the same js function! show_proto()
So what i did is changed the second function to show_proto1() and it solved my problem!

Related

Page content hiding behind the header menu. How do i fix it?

I am trying to use the following header menu template across my website. unfortunately, the menu hides the top part of my page content. I am a newbie. Please help. I tried, removing z-index, adding bottom margin, noting works.
The header.php code
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Responsive Hamburger Menu</title>
</head>
<body>
<!-- partial:index.partial.html -->
<header class="header">
<a href="" class="logo">
<img src="https://placeholder.com/wp-content/uploads/2018/10/placeholder.com-logo1.jpg"
class="logoimage"/></a>
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn">
<span class="navicon"></span>
</label>
<ul class="menu">
<li class="contactme">Contact Me</li>
<li class="aboutme">About Me</li>
<li class="projects">Projects</li>
<li class="Home">Home</li>
</ul>
</header>
<!-- partial -->
<style>
body {
margin: 0;
font-family: Helvetica, sans-serif;
background-color: #fffceb;
}
a {
color: #000;
}
/* header */
.header {
background-color: #fff;
box-shadow: 1px 1px 4px 0 rgba(0,0,0,.1);
position: fixed;
width: 100%;
z-index: 3;
}
.header ul {
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
background-color: #fff;
}
.header li a {
display: block;
padding: 20px 20px;
text-decoration: none;
}
.header li a:hover,
.header .menu-btn:hover {
background: rgb(255, 245, 246);
color: rgb(247, 133, 152);
}
.header .logo {
display: block;
float: left;
font-size: 2em;
padding: 10px 20px;
text-decoration: none;
}
/* menu */
.header .menu {
clear: both;
max-height: 0;
transition: max-height .2s ease-out;
}
/* menu icon */
.header .menu-icon {
cursor: pointer;
display: inline-block;
float: right;
padding: 28px 20px;
position: relative;
user-select: none;
}
.header .menu-icon .navicon {
background: #333;
display: block;
height: 2px;
position: relative;
transition: background .2s ease-out;
width: 18px;
}
.header .menu-icon .navicon:before,
.header .menu-icon .navicon:after {
background: #333;
content: '';
display: block;
height: 100%;
position: absolute;
transition: all .2s ease-out;
width: 100%;
}
.header .menu-icon .navicon:before {
top: 5px;
}
.header .menu-icon .navicon:after {
top: -5px;
}
/* menu btn */
.header .menu-btn {
display: none;
}
.header .menu-btn:checked ~ .menu {
max-height: 240px;
}
.header .menu-btn:checked ~ .menu-icon .navicon {
background: transparent;
}
.header .menu-btn:checked ~ .menu-icon .navicon:before {
transform: rotate(-45deg);
}
.header .menu-btn:checked ~ .menu-icon .navicon:after {
transform: rotate(45deg);
}
.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before,
.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
top: 0;
}
.logoimage{
width: 130px;
}
/* 48em = 768px */
#media (min-width: 48em) {
.header li {
float: left;
}
.header li a {
padding: 20px 30px;
}
.header .menu {
clear: none;
float: right;
max-height: none;
}
.header .menu-icon {
display: none;
}
.Home{
order: 1;
}
.projects{
order: 2;
}
.aboutme{
order: 3;
}
.contactme{
order: 4;
}
}
#media only screen and (max-width: 600px) {
.menu{
display: flex;
flex-direction: column-reverse;
}
}
</style>
</body>
</html>
Then I have a index.php where I include this header.
The style related to my index.php is
body {
background-color: #f2f2f2;
}
.formular input:disabled {
background-color: #dddddd;
}
.hint {
color: grey;
}
.title {
font-weight: bold;
}
p.subtitle {
font-weight: bold;
}
.requiredSymbol {
color: red;
}
.formular input[readonly="readonly"] {
background-color: #dddddd;
}
form.formular,
.validationEngineContainer {
/*background-color: #FFFFFF;*/
font-family: tahoma, verdana, "sans-serif";
font-size: 12px;
padding: 20px;
border: 1px solid #a5a8b8;
width: 700px;
margin: 0 auto;
}
.formular fieldset {
margin-top: 20px;
padding: 15px;
border: 1px solid #b5b8c8;
border-radius: 5px;
}
Your header css should have a position:relative. And you can add some margin to add distance from whatever is in the body.
Example shown below:
.header {
background-color: #fff;
box-shadow: 1px 1px 4px 0 rgb(0 0 0 / 10%);
position: relative;
width: 100%;
z-index: 3;
margin-bottom: 10px;
}

input field CSS Code doesn't render correctly when doctype html is added

I am working on a simple login page with a login form. When i added < !DOCTYPE HTML>, the input field sketched further than the container when set to 100% width. I have searched for solution and noticed questions asked consider doctype messing up css is regarding a specific problem.
Below are my codes;
.loginbox {
width: 320px;
height: 440px;
background: #000;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-sizing: border-box;
padding: 70px 30px;
}
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.loginbox {
width: 450px;
height: 480px;
padding: 90px 30px;
}
.inputContainer input {
margin-bottom: 30px;
}
}
.loginavatar {
width: 100px;
height: 100px;
border-radius: 50%;
position: absolute;
top: -50px;
left: calc(50% - 50px);
}
.loginbox h1 {
font-size: 22px;
text-align: center;
margin: 0;
padding: 0 0 20px;
}
.inputContainer input {
margin-bottom: 20px;
}
input:-webkit-autofill {
-webkit-text-fill-color: #ffffff !important;
transition: background-color 5000s ease-in-out 0s;
-webkit-transition: background-color 5000s ease-in-out 0s;
}
.inputContainer input[type="text"],
input[type="password"] {
width: 100%;
height: 42px;
background: transparent;
color: #fff;
font-size: 14px;
font-family: inherit;
font-weight: 400;
border: none;
border-bottom: 1px solid #333;
outline: none;
padding-left: 25px;
}
.logico {
position: absolute;
top: 20%;
}
.usernithicon,
.passnithicon {
position: relative;
}
.inputContainer input[type="text"]:hover,
input[type="password"]:hover,
input[type="text"]:focus,
input[type="password"]:focus {
border-bottom: 1px solid #bc2333;
}
.inputContainer .inputBox label {
position: absolute;
top: 0;
left: 10%;
padding: 15px 0 0 0;
font-size: 14px;
pointer-events: none;
transition: .5s;
}
.inputContainer .inputBox input:focus~label,
.inputContainer .inputBox input:valid~label {
top: -18px;
left: 10%;
font-size: 12px;
color: #bc2333;
}
input[type=checkbox]+label {
display: block;
margin: 3px 3px 20px;
cursor: pointer;
padding: 0;
}
input[type=checkbox] {
display: none;
}
input[type=checkbox]+label:before {
content: "\2714";
border: 1px solid #fff;
border-radius: 0.2em;
display: inline-block;
width: 1em;
height: 1em;
padding-left: 0.2em;
padding-bottom: 0.3em;
margin-right: 0.2em;
vertical-align: bottom;
color: transparent;
transition: .2s;
}
input[type=checkbox]+label:active:before {
transform: scale(0);
}
input[type=checkbox]:checked+label:before {
background-color: #bc2333;
border-color: #bc2333;
color: #fff;
}
input[type=checkbox]:checked:disabled+label:before {
transform: scale(1);
background-color: #bc2333;
border-color: #bc2333;
opacity: 0.5;
}
input[type=checkbox]:disabled+label:before {
transform: scale(1);
border-color: #fff;
opacity: 0.2;
}
.inputContainer input[type="submit"] {
width: 100%;
height: 48px;
background: #bc2333;
color: #fff;
font-size: 16px;
font-weight: 500;
font-family: inherit;
border: 0;
outline: none;
}
.inputContainer input[type="submit"]:hover {
cursor: pointer;
background: #7a091f;
transition: .3s ease;
}
.inputContainer a {
color: #fff;
display: block;
text-decoration: none;
text-align: center;
}
.inputContainer a:hover {
color: #f4f4f4;
transition: .2s ease;
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="application-name" content="">
<title>Member Login</title>
<link rel="stylesheet" href="fonts/FontAwesome/css/fontawesome-all.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/login.css">
</head>
<body>
<div class="loginbox">
<img class="loginavatar" src="assets/images/user.png" draggable="false" />
<h1>Login Form</h1>
<div class="inputContainer">
<form method="POST" action="">
<!--<p>Username</p>-->
<div class="usernithicon inputBox">
<i class="fa fa-user logico"></i>
<input type="text" id="usern" name="username" required><label for="usern">Username</label></div>
<!--<p>Password</p>-->
<div class="passnithicon inputBox">
<i class="fa fa-lock logico"></i>
<input type="password" id="pswrd" name="password" required><label for="pswrd">Password</label></div>
<input type="checkbox" id="remberme" name="remember"><label for="remberme">Remeber Me</label>
<input type="submit" name="" value="Login">
Forgot password?<br>
Create An Account
</form>
</div>
</div>
</body>
</html>
When this renders in browser the username and password input field will become stretched and i was able to use width:90%;, which works fine but i would love to have it set to width:100%; (which works perfectly without added the doctype tag) but when the doctype code is added, it becomes stretched.
Additional Issue: The background image i added to the body wont cover the whole screen, it breaks in the middle and repeat. i tried adding background-repeat:none; but didn't work. but if i remove the doctype tag, the background fills up the page as expected.
How do i solve this?
base on what you want i added display: inline-flex; in your input wrappers
Try this
.loginbox {
width: 320px;
height: 440px;
background: #000;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-sizing: border-box;
padding: 70px 30px;
}
#media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.loginbox {
width: 450px;
height: 480px;
padding: 90px 30px;
}
.inputContainer input {
margin-bottom: 30px;
}
}
.loginavatar {
width: 100px;
height: 100px;
border-radius: 50%;
position: absolute;
top: -50px;
left: calc(50% - 50px);
}
.loginbox h1 {
font-size: 22px;
text-align: center;
margin: 0;
padding: 0 0 20px;
}
.inputContainer input {
margin-bottom: 20px;
}
input:-webkit-autofill {
-webkit-text-fill-color: #ffffff !important;
transition: background-color 5000s ease-in-out 0s;
-webkit-transition: background-color 5000s ease-in-out 0s;
}
.inputContainer input[type="text"],
input[type="password"] {
width: 100%;
height: 42px;
background: transparent;
color: #fff;
font-size: 14px;
font-family: inherit;
font-weight: 400;
border: none;
border-bottom: 1px solid #333;
outline: none;
padding-left: 20px;
}
.logico {
position: absolute;
top: 20%;
}
.usernithicon,
.passnithicon {
position: relative;
display: inline-flex;
align-items: baseline;
width: 100%;
}
.inputContainer input[type="text"]:hover,
input[type="password"]:hover,
input[type="text"]:focus,
input[type="password"]:focus {
border-bottom: 1px solid #bc2333;
}
.inputContainer .inputBox label {
position: absolute;
top: 0;
left: 10%;
padding: 15px 0 0 0;
font-size: 14px;
pointer-events: none;
transition: .5s;
}
.inputContainer .inputBox input:focus~label,
.inputContainer .inputBox input:valid~label {
top: -22px;
left: 10%;
font-size: 12px;
color: #bc2333;
}
input[type=checkbox]+label {
display: block;
margin: 3px 3px 20px;
cursor: pointer;
padding: 0;
}
input[type=checkbox] {
display: none;
}
input[type=checkbox]+label:before {
content: "\2714";
border: 1px solid #fff;
border-radius: 0.2em;
display: inline-block;
width: 1em;
height: 1em;
padding-left: 0.2em;
padding-bottom: 0.3em;
margin-right: 0.2em;
vertical-align: bottom;
color: transparent;
transition: .2s;
}
input[type=checkbox]+label:active:before {
transform: scale(0);
}
input[type=checkbox]:checked+label:before {
background-color: #bc2333;
border-color: #bc2333;
color: #fff;
}
input[type=checkbox]:checked:disabled+label:before {
transform: scale(1);
background-color: #bc2333;
border-color: #bc2333;
opacity: 0.5;
}
input[type=checkbox]:disabled+label:before {
transform: scale(1);
border-color: #fff;
opacity: 0.2;
}
.inputContainer input[type="submit"] {
width: 100%;
height: 48px;
background: #bc2333;
color: #fff;
font-size: 16px;
font-weight: 500;
font-family: inherit;
border: 0;
outline: none;
}
.inputContainer input[type="submit"]:hover {
cursor: pointer;
background: #7a091f;
transition: .3s ease;
}
.inputContainer a {
color: #fff;
display: block;
text-decoration: none;
text-align: center;
}
.inputContainer a:hover {
color: #f4f4f4;
transition: .2s ease;
}
For the background try this
body, html{
height: 100%;
background-image: url('your_image_path')
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

Wordpress Ultimate Popup Plugin - Keep modal open even when clicked outside of?

I am using Ultimate Popup Plugin from CodeCanyon on this website Click here to create a login modal.
The code is working fine, but the popup stays even if someone clicks outside the popup, and the user must enter the details and click enter.
This is how it looks;
I tried providing a z-index to keep the popup on but I am stuck.
I had updated the code I have for the wordpress plugin whatever I could find.
This is the CSS and the JS of the popup:
jQuery(window).load(function(){
if (jQuery.cookie("popupTemporaryCookie13428")) {
// Popup is hiding after showing first time!
jQuery("#ultimate-popup-13428").hide();
} else if (jQuery.cookie("popupLongerCookie13428")) {
var inst = jQuery("#ultimate-popup-13428").remodal();
inst.open();
jQuery("#ultimate-popup-13428").addClass("ultimate-popup-wrapper-activate");
} else {
var inst = jQuery("#ultimate-popup-13428").remodal();
inst.open();
jQuery("#ultimate-popup-13428").addClass("ultimate-popup-wrapper-activate");
}
var expiresAt = new Date();
expiresAt.setTime(expiresAt.getTime() + 1*24*60*60*1000); // Days
jQuery.cookie("popupLongerCookie13428", new Date());
jQuery.cookie("popupTemporaryCookie13428", true, { expires: expiresAt });
});
* {
box-sizing: border-box;
}
*:before,
*:after {
box-sizing: border-box;
}
.ultimate-popup-wrapper {
background: #fff none repeat scroll 0 0;
border-top: 8px solid;
padding: 35px;
position: fixed;
text-align: center;
z-index: 9999;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: .4s;
transition: .4s;
visibility: hidden;
max-width: 100%;
}
.ultimate-popup-wrapper-activate {
opacity: 1;
filter: alpha(opacity=100);
visibility: visible;
}
.cross-btn-ppm {
font-size: 20px;
font-weight: 700;
position: absolute;
right: 10px;
text-transform: uppercase;
top: 5px;
cursor: pointer;
z-index: 99;
font-family: arial, sans-serif;
}
.ultimate-popup-inner h2,
.entry-content .ultimate-popup-inner h2,
.entry-summary .ultimate-popup-inner h2,
.page-content .ultimate-popup-inner h2,
.comment-content .ultimate-popup-inner h2 {
font-size: 25px;
margin: 0 0 15px;
word-wrap: normal;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
.ultimate-popup-inner {
font-size: 16px;
}
.ultimate-popup-shortcodes p {
margin-bottom: 15px;
}
.ultimate-popup-shortcodes input[type="text"],
.ultimate-popup-shortcodes input[type="email"] {
border: 1px solid #ddd;
margin-bottom: 10px;
padding: 10px !important;
width: 100% !important;
}
.ultimate-popup-shortcodes {
margin: 30px auto 0;
max-width: 500px;
text-align: left;
}
.ultimate-popup-shortcodes br { display: none }
.ultimate-popup-shortcodes input[type="submit"] {
border: medium none;
border-radius: 7px;
color: #fff;
font-size: 17px;
padding: 15px;
width: 100%;
text-transform: uppercase;
-webkit-transition: .4s;
transition: .4s;
}
.ultimate-popup-shortcodes .gform_wrapper .gform_heading { display: none }
.ultimate-popup-shortcodes .gform_wrapper .gform_footer {
margin: 15px 0 0;
padding: 0;
}
.ultimate-popup-wrapper-hide .lean-overlay,
.ultimate-popup-wrapper-hide .ultimate-popup-wrapper {
display: none !important;
visibility: hidden !important;
}
.ultimate-popup-halfway-scroll-activate .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-2 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-3 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-4 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-8 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-9 .cross-btn-ppm {
right: 0;
top: 0;
z-index: 99;
border-radius: 0;
}
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-2 .cross-btn-ppm { top: -8px }
.ultimate-popup-theme-id-5.ultimate-popup-halfway-scroll-activate .cross-btn-ppm {
background: #333;
height: 40px;
width: 40px;
line-height: 40px;
border-radius: 50%;
top: 20px;
z-index: 9;
}
.ultimate-popup-theme-id-5.ultimate-popup-halfway-scroll-activate .popup-inner-col-thumb { padding-top: 5px }
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-12 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-10 .cross-btn-ppm,
.ultimate-popup-halfway-scroll-activate.ultimate-popup-theme-id-6 .cross-btn-ppm {
right: 10px;
top: 5px;
}
.ultimate-popup-theme-id-1 .cross-btn-ppm { right: 10px }
/* Mobile Layout: 320px. */
#media only screen and (max-width: 767px) {
.ultimate-popup-wrapper { overflow: auto }
.ultimate-popup-wrapper .pop-inner-column .popup-inner-col-thumb {
float: none;
margin-bottom: 30px;
margin-top: 0;
padding: 0;
width: auto;
}
.ultimate-popup-wrapper .pop-inner-column .popup-inner-col-cont {
float: none;
padding: 25px;
width: auto;
}
.ultimate-popup-automatic-activate .cross-btn-ppm,
.ultimate-popup-automatic-activate.ultimate-popup-theme-id-2 .cross-btn-ppm,
.ultimate-popup-automatic-activate.ultimate-popup-theme-id-3 .cross-btn-ppm,
.ultimate-popup-automatic-activate.ultimate-popup-theme-id-4 .cross-btn-ppm,
.ultimate-popup-automatic-activate.ultimate-popup-theme-id-8 .cross-btn-ppm,
.ultimate-popup-automatic-activate.ultimate-popup-theme-id-9 .cross-btn-ppm {
right: 0;
top: 0;
z-index: 99;
border-radius: 0;
}
}
<div class="remodal" data-remodal-id="modal"
data-remodal-options="hashTracking: false, closeOnOutsideClick: false">
<form method="post">
<div class="form-group">
<label for="email">Login</label>
<input type="text" class="form-control" required name="email" id="email">
</div>
<div class="form-group">
<label for="pwd">Password</label>
<input type="password" class="form-control" required id="pwd" name="pwd">
</div>
<button type="submit" class="btn btn-default">Enter</button>
</form>
</div>

Time line trouble

I need to do time-line as time-line on facebook, each div under another div.
For blocks I have : -float: left, display: inline-block; but can't remove free space.
<div class="wrap">
<input type="hidden" id="tp" value="<?php echo $tp; ?>" />
<?php
$i=0;
foreach($memes as $key=>$val){
$i++;
if($i!=1){
echo "<br clear='all' />";
echo "<br clear='all' />";
}else{
echo "<br clear='all' />";
}
echo "<h1 class='fd_date' alt='".$key."'>".(($res = dt_diff($key)) ? $res : (($dt = explode("-", $key)) ? $res : ""))." ".getDay($key)."</h1>";
echo "<br clear='all' />";
echo "<div class='memescont'>";
for($cnt=0;$cnt<count($val);$cnt++){
if($cnt%2==0){
echo"
<div class='fd_meme' rel='".$val[$cnt]['id']."' >
<h1 class='title'>".$val[$cnt]['tit']."</h1>
<img width='465px' alt='".trim("Комиксы, мемы - ").$val[$cnt]['tit']."' src='".base_url()."upload/".$val[$cnt]['src']."' />
<div class='social'>
<div class='likes'>Понравилось:</div>
<div class='shared'>Поделиться:</div>
</div>
</div>
";
}else{
echo"
<div class='fd_meme' rel='".$val[$cnt]['id']."' >
<h1 class='title'>".$val[$cnt]['tit']."</h1>
<img width='465px' alt='".trim("Комиксы, мемы -").$val[$cnt]['tit']."' src='".base_url()."upload/".$val[$cnt]['src']."' />
<div class='social'>
<div class='likes'>Понравилось:</div>
<div class='shared'>Поделиться:</div>
</div>
</div>
";
}
}
echo "</div>";
}
?>
<br clear="all" />
</div>
css :
.content {
height: 100%;
overflow: auto;
position: absolute;
width: 100%;
z-index: 3;
}
.head {
display: inline-block;
width: 100%;
z-index: 2;
}
.wraphead {
margin: 5% auto;
left: 0;
right: 0;
clear: both;
display: block;
margin: 0 auto;
width: 1280px;
height: 64px;
background: url(../i/header.png) 0 0 no-repeat;); position: fixed; top: 0; z-index: 2;
}
#logo { width: 145px; height: 38px; background: url(../i/logo.png) 0 0 no-repeat; float:left; margin: 11px 0;}
.links { height: 60px; float: left; margin-left: 115px;}
.links a { float: left; color: #fff; font-size: 14px; font-family: Verdana, Geneva, sans-serif; margin: 17px 90px 23px 0; }
.links a:hover {cursor: pointer;}
.langs {float: left; width: 62px; height: 20px; border: 1px solid #dedede; border-radius: 1px; margin: 17px 0 23px; }
.langs .lang { margin-left: 8px; width: 10px; height: 8px; margin-top: 6px; margin-bottom: 6px; display: inline-block;}
.lang.ru {background: url(../i/ru.png) 0 0 no-repeat;}
.langs span { font-size: 10px; font-family: Verdana, Geneva, sans-serif; font-style: normal; color: #ffffff; float: right; display: inline-block; margin-top: -18px; margin-right: 22px;}
em.lang_select{ width: 5px; height: 3px; background: url(../i/lang_select.png) 0 0 no-repeat; display: inline-block; float: right; margin-top: -11px; margin-right: 10px}
em.lang_select:hover {cursor: pointer; }
.wrap {width: 980px; display: block; margin: 0 auto;}
.memes {width: 100%; display: inline-block;}
.memes .wrap { background: #fff; z-index: -1; -moz-box-shadow: 0 0 3px rgba(0,0,0,0.5); /* Для Firefox */
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.5); /*Для Safari и Chrome */
box-shadow: 0 0 3px rgba(0,0,0,0.5); /* Параметры тени */ }
.lft { width: 465px; display: inline-block; padding: 10px 0; }
h1.title{ font-size: 20px; color: #000; font-family: Arial, Helvetica, sans-serif; max-width: 460px; display: inline-block; float: left; font-weight: lighter; text-align: left; margin: 4px 0;}
.martop40 { margin-top: 30px; }
.rgt { width: 465px; float:left; display: inline-block; margin: 0 11px; padding-right: 13px; border-right: 2px solid #999999; }
h1.fd_date{ color: #626262; font-size: 16px; font-family: Verdana, Geneva, sans-serif; text-align: center; font-weight: lighter; bottom: 0;}
.line {width: 2px; display: inline-block; position: absolute; margin-left: 2px; background: url(../i/line.png) 0 0 repeat-y; z-index: 0; min-height: 100%; height: auto;}
.memescont {margin: -10px 0;}
.social { height: 80px; width: 469px; background: url(../i/social_bg.png) 0 0 no-repeat; }
.rgt img, .lft img {border: 1px solid #999;}
.fd_meme { width: 465px; float: left; margin: 0 12px; display: inline-block;}
.right { width: 490px; float: left; }
.left { width: 490px; float: right; }
.likes, .shared {font-family: Verdana, Geneva, sans-serif; font-size: 14px; color: #272727; padding-top: 12px; padding-left: 10px; display: inline-block; width: 202px; height:60px;}
pic: http://picshare.ru/view/97355/rand.png.html
ps. Sorry for my bad english.
It sounds like you are looking for the jQuery masonry plugin. See here
This is what it will look like

How to Get the first image from the wordpress post resize it (50x50 thumbnail) then display it?

I got this code which address my "Get the 1st image of the post then display it" issue.
<?php echo get_first_image() ?>
My problem is, how to i make it to automatically adjust its size (lets say 50x50) then display it.
What i want to to do is simply get the image from my published post, resize it (50x50 and 250x250) then display it. It will be use in a slider/enhance version of recent post.
thank you very much!
HERES THE CODE of the SLIDER/Recent post
$(".main_image .desc").show();
$(".main_image .block").animate({ opacity: 0.85 }, 1 );
$(".image_thumb ul li:first").addClass('active');
$(".image_thumb ul li").click(function(){
//Set Variables
var imgAlt = $(this).find('img').attr("alt");
var imgTitle = $(this).find('a').attr("href");
var imgDesc = $(this).find('.block').html();
var imgDescHeight = $(".main_image").find('.block').height();
if ($(this).is(".active")) {
return false;
} else {
//Animate the Description
$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {
$(".main_image .block").html(imgDesc).animate({ opacity: 0.85, marginBottom: "0" }, 250 );
$(".main_image img").attr({ src: imgTitle , alt: imgAlt});
});
}
//Show active list-item
$(".image_thumb ul li").removeClass('active');
$(this).addClass('active');
return false;
}) .hover(function(){
$(this).addClass('hover');
}, function() {
$(this).removeClass('hover');
});
$("a.collapse").click(function(){
$(".main_banner .block").slideToggle();
$("a.collapse").toggleClass("show");
});
<div class="main_image">
<img src="banner1.jpg" alt="" />
<div class="desc">
Close Me!
<div class="block">
<h2>Title</h2>
<small>Date</small>
<p>Copy</p>
</div>
</div>
</div>
<div class="image_thumb">
<ul>
<li>
<img src="image\banner1_thumb.jpg" alt="image1234" />
<div class="block">
<h2>Title</h2>
<small>Date</small>
<p>Copy</p>
</div>
</li>
</ul>
</div>
.main_image {
width: 598px;
height: 456px;
float: left;
background: #333;
position: relative;
overflow: hidden;
color: #fff;
}
.main_image h2 {
font-size: 2em;
font-weight: normal;
margin: 0 0 5px;
padding: 10px;
}
.main_image p {
font-size: 1.2em;
line-height: 1.6em;
padding: 10px;
margin: 0;
}
.block small {
font-size: 1em;
padding: 0 0 0 20px;
background: url(iconcalendarKO.gif) no-repeat 0 center;
}
.main_image .block small {margin-left: 10px;}
.main_image .desc{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
display: none;
.main_image .block{
width: 100%;
background: #111;
border-top: 1px solid #000;
}
.main_image a.collapse {
background: url(btn_collapse.gif) no-repeat left top;
height: 27px;
width: 93px;
text-indent: -99999px;
position: absolute;
top: -27px;
right: 20px;
}
.main_image a.show {background-position: left bottom;}image_thumb section CSS
.image_thumb {
float: left;
width: 299px;
background: #f0f0f0;
border-right: 1px solid #fff;
border-top: 1px solid #ccc;
}
.image_thumb img {
border: 1px solid #ccc;
padding: 5px;
background: #fff;
float: left;
}
.image_thumb ul {
margin: 0;
padding: 0;
list-style: none;
}
.image_thumb ul li{
margin: 0;
padding: 12px 10px;
background: #f0f0f0 url(nav_a.gif) repeat-x;
width: 279px;
float: left;
border-bottom: 1px solid #ccc;
border-top: 1px solid #fff;
border-right: 1px solid #ccc;
}
.image_thumb ul li.hover {
.image_thumb {
float: left;
width: 299px;
background: #f0f0f0;
border-right: 1px solid #fff;
border-top: 1px solid #ccc;
}
.image_thumb img {
border: 1px solid #ccc;
padding: 5px;
background: #fff;
float: left;
}
.image_thumb ul {
margin: 0;
padding: 0;
list-style: none;
}
.image_thumb ul li{
margin: 0;
padding: 12px 10px;
background: #f0f0f0 url(nav123_a.gif) repeat-x;
width: 279px;
float: left;
border-bottom: 1px solid #ccc;
border-top: 1px solid #fff;
border-right: 1px solid #ccc;
}
.image_thumb ul li.hover {
background: #ddd;
cursor: pointer;
}
.image_thumb ul li.active {
background: #fff;
cursor: default;
}
html .image_thumb ul li h2 {
font-size: 1.5em;
margin: 5px 0;
padding: 0;
}
.image_thumb ul li .block {
float: left;
margin-left: 10px;
padding: 0;
width: 170px;
}
.image_thumb ul li p{display: none;}
isnt get_the_post_thumbnail enough?
Just call it twice, with different sizes

Categories