Post notes slides over the posts in Tumblr's permalink page - html

On my tumblr blog, I am using a custom masonry theme, in which post notes should be below the post in the permalink pages. First it was sliding over the post, which don't let the viewers to view the post in permalink page. Then I lowered the z-index of the post notes css, now posts notes slides under the post.
For example : Click here
#content {
{block:IndexPage}
width:66%;
{/block:IndexPage}
{block:PermalinkPage}
width: 55%;
{/block:PermalinkPage}
top:170px;
{block:IndexPage}
left: 1%;
{/block:IndexPage}
{block:PermalinkPage}
left: 10%;
{/block:PermalinkPage}
float: left;
position: absolute;
border-right:1px solid #2b2b2b;
}
.entry {
float:center;
{block:indexpage}
width: 43%;
overflow:hidden;
{/block:indexpage}
margin: 2%;
{block:permalinkpage}
width: 500px;
{/block:permalinkpage}
padding: 10px;
background: {color:box};
display: inline-block;
position: relative;
z-index:2;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
}
.entry img {
display: block;
width:auto;
max-width: 100%;
}
.perma2, .perma2 a {
margin-top: 5px;
font-family: 'Coda', sans-serif;
font-size:15px;
color: #40c143;
}
.prmlnk {
background:{color:box};
font-size:15px;
margin-left:10px;
margin-top:5px;
width: 500px;
padding: 10px;
z-index:2;
display: block;
overflow:hidden;
position: relative;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
}
.wrap {position: fixed; bottom:10px; left:0px;}
.wrap:hover .cred a {width: 130px; height: 20px; text-align: right;}
.cred a {
height: 100%; width: 80px; height: 20px; margin-left:-65px;
background-color: #000; font-size: 13px; text-align: right;
overflow: hidden;
z-index: 9999999; padding-top: 3px;
top: -2px;
color: #fff; padding-right: 5px;
-moz-border-radius: 2px;
border-radius: 2px;
display: inline-block;
text-transform: capitalize;
-webkit-transition: all 0.5s ease-out;
-moz-transition: all 0.5s ease-out;
opacity: .7;
filter: alpha(opacity = 70);
font-family: 'Lato', sans-serif;
line-spacing: 1px;
}
ol.notes {
padding: 0px;
margin: 25px 0px;
list-style-type: none;
border-bottom: solid 1px #5a5a5a;
}
ol.notes li.note {
border-top: solid 1px #5a5a5a;
padding: 10px;
}
ol.notes li.note img.avatar {
vertical-align: -4px;
margin-right: 10px;
width: 16px;
height: 16px;
}
ol.notes li.note span.action {
font-weight: normal;
color:#f2f2f2;
}
ol.notes li.note .answer_content {
font-weight: normal;
}
ol.notes li.note blockquote {
border-color: #eee;
padding: 4px 10px;
margin: 10px 0px 0px 25px;
}
ol.notes li.note blockquote a {
text-decoration: none;
}
<div id="content">
<div class="autopagerize_page_element">
{block:Posts}
<div class="entry">
.....POSTS.....
</div>
{block:permalinkpage}{block:NoteCount}
<div class="prmlnk"><div class="perma2">
Posted: {TimeAgo}
{/block:NoteCount}
{block:PostNotes}
{PostNotes}
{/block:PostNotes}
</div>
</div>
{/block:permalinkpage}
{/block:Posts}
</div> <!------------autopagerise page element ends here---------------->
</div><!----------------------Content div ends here-------------------->

On the linked page, if I add top: 100%; to the .prmlnk CSS, the notes then show up below the post instead of being in the same position as the post.

Related

Website shows white space on the right part of page

We are making a website in a team, and we struck at the famous white blank space in the right of page problem. We are looking for other possible causes.
In the homepage, there is a blank white part on the right for
iOS(Iphone5 and Ipad, browsers are Safari and Chrome)
Mac(Browsers are Safari and Chrome)
Ubuntu(Firefox)
but, the same problem is not seen in the Android with chrome or Ubuntu with chrome.
We have tried the following suggestions in the StackOverflow, but no luck.
Setting body and html margin and padding 0
Setting img width 100%
Checking font sizes(most of them is defined 1.2 rem)
Also, I have checked each layout in the dev tools, but none of them appears to exceed body width.
We have also tried to add an extra div after footer, or changing position:fixed to-the-page-top, but the result were the same.
Anyone have a sugguestion?
html, body, div, span, {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
input, button, textarea, select {
margin: 0;
padding: 0;
background: none;
border: none;
border-radius: 0;
outline: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
/*all-1.css*/
#charset "UTF-8";
html {
font-size: 62.5%;
}
body {
position: relative;
background-color: #fff;
color: #333;
font-size: 1.2rem;
font-family: "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
*, *::before, *::after {
box-sizing: border-box;
}
a:link, a:visited, a:hover, a:active {
text-decoration: none;
}
font-family:'Helvetica Neue','Helvetica','Arial',YuGothic,'Yu Gothic','Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN W3','メイリオ', Meiryo,'MS ゴシック',sans-serif;
.tyousei{}
.clearfix::after{
content: '';
display:block;
clear: both;
}
.btn img{
height:40%;
margin-top: 10px;
margin-left: 10px;
}
.btn .right-icon{
position: absolute;
top: 7px;
right: 10px;
}
.btn::before{
content: "";
position: absolute;
left:0%;
bottom:0px;
display: block;
width: 0%;
height: 2px;
background: #2F4D55;
transition: all .4s ease;
}
.btn:hover::before{
width: 100%;
}
#up-btn a{
position: fixed;
right:1%;
bottom:40%;
z-index: 5;
opacity: 0.8;
text-align: center;
height:50px;
width:50px;
padding-top: 8px;
border-radius: 25px;
background-color:#666;
}
#up-btn img{
display: inline-block;
width:65%;
height:75%;
}
.header{
width: 100%;
font-size: 0;
}
.global-navi{
height: 50px;}
.logo{
max-width: 250px;
width:40%;
min-width:200px;
float: left;
padding:20px 10px 10px 20px;
background-color: rgba(255,255,255,0.4)
}
.logo img{
display: block;
width: 100%;
height: auto;
}
.form-top{display: none;}
.sbox > *{
font-size: 1.2rem;
}
.form .sbtn{
width:34px;
height: 28px;
position: absolute;
left:517px;
top: 12px;
border:none;
font-size:20px;
outline: 0;
}
.suggestion{
border-bottom: solid 1px #666;
border-right: solid 1px #666;
border-left: solid 1px #666;
z-index:10;
}
.suggestion:hover{
background-color: rgba(240,240,240,1);
}
.word-suggestion{
width: 236px;
height: 30px;
font-size: 16px;
text-align: left;
padding: 7px 5px;
background-color: rgba(255,255,255,1);
color:#333;
}
.article-suggestion{
width: 350px;
height: 75px;
font-size:16px;
padding: 5px;
background-color: rgba(255,255,255,1);
}
.article-suggestion-title{
position: relative;
height:18px;
overflow:hidden;
font-weight:normal;
letter-spacing: 1px;
line-height:18px;
margin-bottom:12px;
text-decoration: underline;
color:#333;
}
.article-suggestion-desc{
position: relative;
height:30px;
overflow:hidden;
font-size:14px;
line-height: 16px;
color: #666;
padding-left:6px;
}
.article-suggestion-desc::after{
content: "";
position: absolute;
top:0px;
left:0px;
width:3px;
height:100%;
background-color: #74c0d5;
}
.article-number{
width: 350px;
height:30px;
background-color: rgba(255,255,255,0.7);
z-index:20;
font-size:14px;
color:#666;
text-align: center;
padding-top: 7px;
}
.result{
position: absolute;
top:41px;
left:282px;
z-index: 20;
}
#no-result{
width: 350px;
height:210px;
background-color: rgba(255,255,255,1);
border-bottom: solid 1px #666;
border-right: solid 1px #666;
border-left: solid 1px #666;
font-size:16px;
line-height:20px;
padding:10px;
z-index: 10;
}
#no-result .kobetuba-mail-link{
display: block;
width:80%;
height:60px;
text-align: center;
margin:10px auto 5px;
border: solid 1px #666;
padding: 2px;
cursor: pointer;
border-radius: 3px;
position: relative;
}
#no-result .kobetuba-mail-link img{
height:32px;
}
#no-result .kobetuba-mail-link p{
font-size: 16px;
color:#666;
}
#no-result .right-icon{
position: absolute;
top:15px;
right:5px;
color:#666;
}
#no-result .kobetuba-mail-link:hover{
background-color: rgba(230,230,230,0.6)
}
#media (min-width: 800px){
.form-top{
display: block;
position:relative;
}
}
.navi-box{
float:right;
}
.navi{
display: inline-block;
vertical-align: middle;
padding: 5px 2px;
}
#media (max-width:365px){
.article-and-toiro{
display: none;
}
}
#media (min-width:768px){
.article-and-toiro p
{font-size:16px;}
}
.message-box :hover{
opacity: 0.3;
}
.account :hover{
opacity: 0.7;
}
.article-and-toiro:hover {
background:rgba(255,255,255,0.2);
}
.navi-icon a{
position:relative
}
.navi-icon span{
display: inline-block;
top: -45px;
left: 30px;
width:20px;
height: 20px;
border-radius: 50%;
background-color: rgba(255,255,255,0.8);
position:absolute;
color: #666;
text-align: center;
line-height: 20px;
vertical-align: middle;
font-size:16px;
}
.wrapper {
width: 96%;
min-width: 320px;
max-width: 1200px;
padding-bottom:50px;
margin: 10px auto 20px;
}
footer{
display: none;
}
#media (max-width:800px){
footer{
display: block;
}
footer{
box-shadow: 0px -3px 4px -2px rgba(0, 0, 0, 0.1);}
.footer-bottom {
width: 100%;
position: fixed;
bottom: 0;
height:44px;
border-top:double #2F4D55;
background-color: #fff;
padding-top: 5px;
/*background-color:#2F4D55;*/
}
.footer-bottom.close{
box-shadow: 0px -6px 8px -2px rgba(0, 0, 0, 0.3);}
.footer-bottom img{
height:70%;
display: block;
margin:0 auto;
}
.footer-open{
width:100%;
position: fixed;
bottom: 0;
background-color:#fff;
z-index: 10;
}
.footer-bottom.open{
border-top:solid 1px #696969
}
.category-list-bottom {
width:100%;
position: fixed;
top:0px;
bottom: 0px;
left:0px;
right:0px;
overflow-y: scroll;
height:100%;
text-align: center;
background-color:rgba(255,255,255,0.9);
box-shadow: 0px -6px 8px -2px rgba(0, 0, 0, 0.3);
}
}
.category-list-bottom{
}
.close-btn{
height:30px;
background-color: rgba(100,100,100,0.3)
}
.down-icon{
color: #666;
}
.category-list-bottom .form-bottom{
display: inline-block;
width: 100%;
padding-bottom:10px;
position: relative;
}
.category-list-bottom .form .sbtn{
position: absolute;
top:41px;
left:10px;
width:40px;
height:40px;
border-radius:20px;
background-color: transparent;
border:solid 2px #2F4D55;
color:#737575;
box-shadow: 2px 2px 4px -2px rgba(0, 0, 0, 0.3);
}
.category-list-bottom .form-bottom{
display: inline-block;
width: 100%;
}
.category-list-bottom .form .sbox{
position:absolute;
top:18px;
right:11%;
left:2%;
width:85%;
height:44px;
font-size: 16px;
border:solid 1px #535353;
}
.category-list-bottom .form .sbtn{
position: absolute;
top:20px;
right:2%;
left:88%;
border-radius: 50%;
}
.result-word-suggestion{
position: absolute;
top:64px;
right: 11%;
left: 3%;
width:85%;
z-index: 10;
}
.result-article-suggestion{
position: absolute;
top:64px;
right: 11%;
left: 2%;
width: 95%;
z-index: 10;
}
.form-bottom .word-suggestion{
width:100%;
height: 64px;
/* font-size: 16px; */
z-index: 100;
background-color: #f2fbfd;
}
.form-bottom .article-suggestion{
width: 100%;
z-index: 100;
text-align: left;
background-color: #f2fbfd;
border-left:solid 1px rgba(0,0,0,0.3);
border-right:solid 1px rgba(0,0,0,0.3);
}
.form-bottom .article-number{
width:100%;
z-index: 100;
text-align: center;
background-color: #f2fbfd;
border-left:solid 1px rgba(0,0,0,0.3);
border-right:solid 1px rgba(0,0,0,0.3);
}
.form-bottom .article-suggestion:hover,.form-bottom .article-number:hover{
background-color: rgba(255,255,255,1);
}
#form-bottom-no-result{
width:100%;
z-index: 100;
background-color: #f2fbfd;
border-left:solid 1px rgba(0,0,0,0.3);
border-right:solid 1px rgba(0,0,0,0.3);
border-bottom:solid 1px rgba(0,0,0,0.3);
font-size: 16px;
padding: 10px;
line-height: 20px;
color: #666;
text-align: left;
}
#form-bottom-no-result .kobetuba-mail-link{
display: block;
width:95%;
margin:10px auto 5px;
height:70px;
padding: 3px;
border: solid 1px #666;
border-radius: 3px;
font-size:16px;
text-align: center;
position: relative;
cursor: pointer;
}
#form-bottom-no-result .kobetuba-mail-link img{
max-height:60%;
max-width:95%;
}
#form-bottom-no-result .kobetuba-mail-link .right-icon{
position: absolute;
top:50%;
right:10px;
color:#666;
}
#form-bottom-no-result .kobetuba-mail-link:hover{
background-color: rgba(230,230,230,0.4)
}
.category-list-bottom .category-list-wrapper{
padding:55px 7px 7px;
text-align: left;
min-height:370px;
height:90%;
}
.category-list-bottom .category-list{
margin-top:5px;
margin-bottom:5px;
position: relative;
height:35%;
border:solid 1px #acabab;
border-bottom:solid 2px #2F4D55;
background-color:rgba(255,255,255,0.5)
}
.category-list-bottom .category-list-img{
position:absolute;
top:50%;
left:50%;
transform: translateX(-50%) translateY(-50%);
padding-top:2px;
padding-bottom:2px;
}
.category-list-bottom .category-mini-list-wrapper li{
height:44px;
list-style: none;
margin:6px 10px 6px 10px;
padding:12px 7px;
background-color: rgba(200,200,200,0.5);
border-radius: 7px 22px 22px 7px;
zoom:0.8;
position: relative;
}
.category-list-bottom .article .category-mini-list-wrapper li{
display: inline-block;
width:47%;
margin-top:3px;
margin-bottom:3px;
margin-right: 0px;
}
.category-list-bottom .right-icon{
color:#666;
position: absolute;
top:50%;
right:5px;
transform:translateY(-50%);
}
.category-list-bottom .category-list.torio{
height:25%;
border-radius: 3px 22px 22px 3px;
text-align: center;
}
.category-list-bottom .category-list.torio img{
zoom:0.8;
}
.category-list-bottom .category-list.torio .new-icon{
margin-top:40px;
padding-left: 160px;
width:210px;
}
.category-list.all-close{
height:35%;
}
.category-list.close{
height:30%;
min-height:80px;
}
.category-list.close .category-mini-list-wrapper,.category-list.all-close .category-mini-list-wrapper{
display: none;
}
.category-list.open{
height:auto;
border:none;
}
.category-list.open .category-list-img{
display:block;
position:relative;
top:0;
left:0;
transform:none;
margin:5px auto;
}
.category-list.open .right-icon{
display:none;}
.category-list.open .category-mini-list-wrapper{
display:block}
#media (max-width:500px){
.category-list.close{height:44px}
}
#media (max-width:346px){
.category-list-bottom .article .category-mini-list-wrapper li{
display: inline-block;
width:45%;
}
.category-list-bottom .article .category-mini-list-wrapper img{
zoom:0.9;
}
}
#media(min-width:500px){
.category-list-bottom .kobetuba .category-mini-list-wrapper li{
display: inline-block;
width:46%;
margin-top:3px;
margin-bottom:3px;
}
.category-list-bottom .kobetuba .category-mini-list-wrapper img{
zoom:0.9;
}
}
/* hp_style-1.css */
#charset "UTF-8";
html {
font-size: 62.5%;
}
body {
background-color: #fff;
color: #333;
font-size: 1.2rem;
font-family: "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
*, *::before, *::after {
box-sizing: border-box;
}
a:link, a:visited, a:hover, a:active {
color: #7C5119;
text-decoration: none;
}
font-family: 'Helvetica Neue','Helvetica','Arial',YuGothic,'Yu Gothic','Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN W3','メイリオ', Meiryo,'MS ゴシック',sans-serif;
.header{
width: 100%;
}
.main-visual{
height: 250px;
background-image: url(../img/main-visual-mini.jpg);
background-position: center center;
background-size: cover;
position: relative;
}
#vision{
padding:10px;
position: absolute;
top:40%;
right:2%;
width:45%;
min-width:270px;
max-width:450px;
z-index: 0;
}
#media(max-width:568px){
#vision{background-color: rgba(237,231,221,0.8)}
}
#media (min-width:500px){
.main-visual{
background-image: url(../img/main-visual.jpg);}
}
#media (min-width: 800px){
.main-visual{
height:450px;
background-image: url(../img/main-visual.jpg);
position: relative;
background-position: center;
}
#vision{
background-color: transparent;
}
}
#media (min-width: 1020px){
#vision{
top:30%;
width:55%;
left:55%;
}
}
.sbox{
border:solid 1px #535353;
background-color: rgba(255,255,255,0.3)
}
.form .sbtn{
color:#999;
/*ここから臨時対応*/
border-leftsolid 1px #737575;
}
.sbtn:hover{
color#151e76;
}
.suggestion{
border:none;
border-bottom: solid 1px #666;
}
.suggestion:hover{
opacity: 1;
background-color: rgba(255,255,255,0.9);
}
.word-suggestion{
background-color: rgba(255,255,255,0.4);
}
.article-suggestion{
background-color: rgba(255,255,255,0.7);
}
#no-result{
background-color: rgba(255,255,255,0.8)
}
.message-box :hover{
opacity: 0.6;
}
.account :hover{
opacity: 0.6;
}
.category-navi{
display: none;
}
/*タブレット縦以降*/
#media (min-width: 801px){
.category-mini-list{
list-style-type:none;
}
.category-navi{
display: block;
width: 100%;
height: 50px;
background-color: rgba(255,255,255,0.7);
position: absolute;
bottom: 0px;
border-bottom:double #022567;
font-size: 0;
padding-left:5%;
padding-right:5%;
text-align: center;
}
.category-list {
display: inline-block;
position: relative;
width: 30%;
top:0px;
min-width: 130px;
height: 50px;
vertical-align: middle;
padding-left: 16%;
padding-right: 16%;
}
.category-list-button{
position:absolute;
width: auto;
max-width: 280px;
top:0;
bottom: 0;
left: 0;
right:0;
margin: auto;
cursor: pointer;
}
.category-list-img {
position: absolute;
top: 60%;
left: 50%;
transform: translateX(-50%)translateY(-50%);
width: auto;
max-width: 100%;
height:auto;
margin: auto;
}
.category-list.toiro .category-list-img {
top: 50%;
}
.category-list:hover{
background:rgba(116,192,213,0.3);
}
.category-mini-list-wrapper{
display: none;
background-color: rgba(255,255,255,0.7);
position: absolute;
bottom:50px;
left:0;
width:100%;
height:192px;
opacity: 0.9;
text-align: center;
}
.category-mini-list{
width: 100%;
padding:10px 15px;
}
.category-list-mini-img {
width:auto;
max-width: 100%;
height:auto;
}
.category-mini-list:hover{
background: rgba(116,192,213,0.1);
}
.category-list.toiro .new-icon{
margin-top:15px;
padding-left: 55px;
width:100px;
height:40px;
}
}
.wrapper{
padding-top:20px;
}
section{
margin-top: 40px;
}
#media (min-width: 920px){
.wrapper{
width: 90%;
margin: 20px auto 40px;}
}
#media (max-width:800px){
.recomend,.new {
width:100%;
}
}
#media(min-width:800px){
.new{
width:
}
}
Maybe you didn't set the body/html width and height.
Try this:
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
I added
overflow-x: hidden
You should remove this line, if you need to scroll left and right.

Animated hover state for <button> doesn't work as intended

I have two type's of buttons on the page I am creating:
Actual buttons <button>
Buttons created from <input type="submit">
I am trying to create button's, which on hover, perform like this:
.actions {
display:inline-block;
position:relative;
}
.hs-button {
background-color: #fff336;
}
.hs-button {
padding: 15px 20px 15px 20px;
font-size: 16px;
font-family: "Raleway", sans-serif;
text-transform: uppercase;
line-height: 1em;
color: #333333;
letter-spacing: 0;
border: 3px solid transparent;
display: inline-block;
position: relative;
cursor: pointer;
z-index:1;
}
.actions:hover input[type="submit"] {
border: 3px solid #000;
color: #fff336;
background:transparent;
}
.actions:before {
content: "";
background: #000;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0;
z-index:0;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.actions:hover::before {
height:100%;
}
<div class="hs_submit">
<div class="actions">
<input type="submit" value="DOWNLOAD NOW!" class="hs-button primary large">
</div>
</div>
As you can see, on hover, the black panel come's from bottom to top. I have managed to achieve this for <input type="submit"> buttons, but I can't seem to emulate the same aesthetics for <button>:
.cta-wrapper .cta-text p button{
border: 3px solid #fff336;
}
.thank-you .cta-wrapper {
background-size: cover;
background-position: 50% 50%;
background-repeat: no-repeat;
position: relative;
transition:all 0.3s;
}
.cta-text {
background-color: #ba1974;
padding:30px 30px 45px;
}
.cta-text {
background-color: #474747;
}
.cta-wrapper .cta-link {
position:absolute;
display:block;
height:100%;
width:100%;
top:0;
left:0;
}
.cta-text p {
font-size:16px;
line-height:24px;
font-weight:normal;
font-family: 'Raleway', sans-serif;
margin:0 auto 30px;
color:#fff;
}
.cta-text p:last-child {
margin-bottom:0;
}
.cta-text button {
-webkit-appearance: none;
width: 179px;
max-width: 100%;
border: 2px solid #fff336;
color: #000;
background-color: #fff336;
font-size: 16px;
font-family: 'Calibri W01 Regular_904604';
font-weight:400;
line-height: 1em;
padding: 11px 0 12px;
box-sizing: border-box;
cursor: pointer;
transition:all 0.25s;
}
.cta-wrapper:hover .cta-text button {
background-color: #000;
color:#fff336;
border: 3px solid #000;
}
.cta-wrapper:hover .cta-text button p {
color:#fff336;
}
p.button:first-of-type a:hover {
text-decoration: none;
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
<div class="cta-wrapper">
<div class="cta-image">
</div>
<div class="cta-text">
<p><button>Download</button></p>
</div>
<a class="cta-link" href="#"></a>
</div>
Why isn't <button> performing like <input>?
For the <input> button, when you hover over the button, the background goes transparent for a second and then fills in with black. I want the background to remain yellow and the black to fill it on hover. How can I achieve this? The only way I can get the hover to work right now is to set the background as transparent - and input doesn't support and :after so I don't know how to work around this?
Well, here it is, I don't see your problem ...
.actions {
display:inline-block;
position:relative;
}
.hs-button {
background-color: #fff336;
}
.hs-button {
padding: 15px 20px 15px 20px;
font-size: 16px;
font-family: "Raleway", sans-serif;
text-transform: uppercase;
line-height: 1em;
color: #333333;
letter-spacing: 0;
border: 3px solid transparent;
display: inline-block;
position: relative;
cursor: pointer;
z-index:1;
}
.actions:hover button {
border: 3px solid #000;
color: #fff336;
background:transparent;
}
.actions:before {
content: "";
background: #000;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0;
z-index:0;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.actions:hover::before {
height:100%;
}
<div class="hs_submit">
<div class="actions">
<button class="hs-button primary large">DOWNLOAD NOW</button>
</div>
</div>
.cta-wrapper{
background-color: #fff336;
font-size: 16px;
font-family: "Raleway", sans-serif;
text-transform: uppercase;
line-height: 1em;
color: #333333;
letter-spacing: 0;
display: inline-block;
position: relative;
cursor: pointer;
z-index:1;
}
.cta-text{
display:inline-block;
position:relative;
}
.cta-text button {
-webkit-appearance: none;
width: 179px;
max-width: 100%;
border: 2px solid #fff336;
color: #000;
background-color: #fff336;
font-size: 16px;
font-family: 'Calibri W01 Regular_904604';
font-weight:400;
line-height: 1em;
padding: 11px 0 12px;
box-sizing: border-box;
cursor: pointer;
transition:all 0.25s;
}
.cta-text:hover button {
border: 3px solid #000;
color: white;
background:transparent;
}
.cta-text:before {
content: "";
background: #000;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0;
z-index: -1;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.cta-text:hover::before {
height:100%;
}
span{
font-family: 'Raleway', sans-serif;
}
<div class="cta-wrapper">
<div class="cta-image">
</div>
<div class="cta-text">
<button><span>Download</span></button>
</div>
<a class="cta-link" href="#"></a>
</div>

Want to make text on top of everything using CSS

Here is my html and CSS-
<style>
.bottom-border {
border-bottom-style: solid;
border-bottom-width: 2px;
color: #999;
margin-top: 0.1%;
margin-bottom: 1.5%;
}
.subheading {
position: relative;
padding-left: 0.5em;
padding-right: 0.5em;
font-weight: bold;
font-size: 16px;
font-family: sans-serif;
clear: both;
color: #666666;
z-index: 1000;
}
h1 {
text-align: center;
margin-bottom: -0.4em;
}
</style>
<div class="bottom-border">
<h1><span class="subheading" >Hello World</span></h1>
</div>
I want my text to look like -
And current result is -
I can achieve expected one by setting background-color to white of span but i want to know other way of doing that as it's not ideal way.
You can do it this way which doesn't use background colour.
.lines {
line-height: 0.5;
text-align: center;
}
.lines span {
display: inline-block;
position: relative;
}
.lines span:before,
.lines span:after {
content: "";
position: absolute;
height: 5px;
border-bottom: 1px solid red;
top: 0;
width: 300px;
}
.lines span:before {
right: 100%;
margin-right: 15px;
}
.lines span:after {
left: 100%;
margin-left: 15px;
}
<div class='lines'>
<span>This is some super long text how about that</span>
</div>
You will need to change the widths of the lines on either side though.
Just add a white background to your span
.bottom-border {
border-bottom-style: solid;
border-bottom-width: 2px;
color: #999;
margin-top: 0.1%;
margin-bottom: 1.5%;
}
.subheading {
background-color: white;
position: relative;
padding-left: 0.5em;
padding-right: 0.5em;
font-weight: bold;
font-size: 16px;
font-family: sans-serif;
clear: both;
color: #666666;
z-index: 1000;
}
h1 {
text-align: center;
margin-bottom: -0.4em;
}
<div class="bottom-border">
<h1><span class="subheading" >Hello World</span></h1>
</div>
I guess what you want to achieve is something like this
body {
font-family: 'Cinzel Decorative', cursive;
background: url(http://s.cdpn.io/3/blurry-blue.jpg);
background-size: cover;
background-repeat: no-repeat;
color: white;
}
h1 {
font-size: 3em;
text-align: center;
}
.embiggen {
font-size: 4em;
text-shadow: 0 0 40px #ffbab3;
}
.subtitle {
margin: 0 0 2em 0;
}
.fancy {
line-height: 0.5;
text-align: center;
}
.fancy span {
display: inline-block;
position: relative;
}
.fancy span:before,
.fancy span:after {
content: "";
position: absolute;
height: 5px;
border-bottom: 1px solid white;
border-top: 1px solid white;
top: 0;
width: 600px;
}
.fancy span:before {
right: 100%;
margin-right: 15px;
}
.fancy span:after {
left: 100%;
margin-left: 15px;
}
<h1>Main Title</h1>
<p class="subtitle fancy"><span>A fancy subtitle</span></p>
Update/Add following to your CSS
.subheading {
background:#fff;
padding-left:5px;
padding-right:5px; /** You can change padding value**/
}
Another way is, to use
h1 .subheading{
background:#fff;
position:relative;
}
h1:before{
content="";
width:50%;
height:1px;
background:#000;
position:absolute;
left:0;
top:50%;
}
h1:after{
content="";
width:50%;
height:1px;
background:#000;
position:absolute;
right:0;
top:50%;
/** USE CSS to Create left line **/
}

Need to apply hover to 2nd div when hover over 1st div

CSS:
#content-items .thumb-artist img {
width: 220px;
position: relative;
z-index: 10;
height: 147px;
}
#filter-artist {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 25px 0 25px 10px;
position: relative;
font-weight: bold;
color: #666666;
text-transform: uppercase;
float: left;
width: 100%;
line-height: 1.4em;
}
#filter-artist #s {
border: 0;
font-size: 10px;
color: #666666;
background: transparent;
text-transform: uppercase;
font-family: Arial, Helvetica, sans-serif;
padding: 1px 0px;
width: 80%;
}
#content-items {
width: 960px;
margin: 0 auto;
color: #fff;
}
#filter-artist span {
float: left;
}
#filter-artist a {
color: #666666;
padding: 0 8px;
float: left;
}
.active-filter {
color: #fff!important;
}
#filter-artist #submit {
background-image: url(img/icons.png);
background-position: -84px 0px;
background-color: transparent;
border: 0;
height: 14px;
line-height: 0;
padding: 0;
width: 14px;
float:right;
}
#filter-artist > p {display:none;}
#filter-artist form {
float: left;
border-bottom: 1px solid #666666;
}
#filter-artist #submit:hover {
background-image: url(img/icons.png);
background-position: -84px -14px;
}
#content-items .artist {
width: 25%;
float: left;
padding: 0 1% 40px 1%;
line-height: 1em;
height: 270px;
height: 190px!important;
}
#content-items .thumb-artist {
position: relative;
}
.thumb-artist img:hover .social-content {
opacity:1;
}
#content-items .artist h3 {
font-size: 18px;
margin: 10px 0;
line-height: 1em;
color: #fff;
font-family: "futura-pt",sans-serif;
}
}
element.style {
display: none;
}
#load-items .social-content {
position: absolute;
top: 80%;
left: 0%;
z-index: 15;
width: 100%;
text-align: center;
opacity:0;
-webkit-transition: all 0.5s ease-in;
-moz-transition: all 0.5s ease-in;
-o-transition: all 0.5s ease-in;
transition: all 0.5s ease-out;
}
.social {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
line-height: 1em;
display: inline-block;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
color: #fff;
line-height: 11px;
margin-right: 4px;
}
.facebook {
position:relative;
background-image: url(img/icons.png);
background-position: -3px -1px;
width: 20px;
height: 20px;
padding: 5px;
z-index:15;
float:left;
}
.web {
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
float:left;
}
.sat-color {
background-color: #ff0033;
padding: 5px;
}
.social-content a:hover {
color: #ff3333;
}
.twitter {
position:relative;
background-image: url(img/icons.png);
background-position: -45px -1px;
width: 20px;
height: 20px;
padding: 5px;
float:left;
}
#load-items .social-content:hover {
position: absolute;
top: 80%;
left: 0%;
z-index: 15;
width: 100%;
text-align: center;
opacity:1;
}
.sat-color:hover {
background-color: #ff3333;
color: #fff !important;
}
HTML:
<article id="content-items">
<div id="filter-artist">
<span>FILTER:</span>
ALLNEWESTALPHABETICAL</div>
<div id="load-items">
<div class="artist">
<div class="thumb-artist">
<img width="300" height="138" src="http://downunderlabelgroup.com/wp-content/uploads/2013/03/k_oconnor_lge-300x138.jpg" class="attachment-medium wp-post-image" alt="Kim O'Connor">
<span class="social-content">
OFFICIAL SITE
</span>
</div>
<h3 class="name-artist">Troye Sivan</h3>
</div></div></article>
At the moment the hover effect is only applied when the mouse is hovered onto the social content. I would like to apply it to the whole picture.
So if anyone hovers onto the image the social content is displayed.
Thanks alot.
There are 2 options, 1 make the hover on the div, 2 hover on the img
1st option (recommended):
#content-items .thumb-artist:hover .social-content {
opacity: 1;
}
2nd option (use + next selector):
#content-items .thumb-artist .wp-post-image:hover + .social-content {
opacity: 1;
}
DEMO: http://jsfiddle.net/7w8spct6/
Maybe a CSS rule like this could work
img.attachement-medium:hover + .social-content {
position: absolute;
top: 80%;
left: 0%;
z-index: 15;
width: 100%;
text-align: center;
opacity:1;
}
But a better way would be to actually take the <img> and <span> elements you want and put them inside a new <div> and then have a rule for the contents of the <div>
<div class="wrapper">
<img width="300" height="138" src="http://downunderlabelgroup.com/wp-content/uploads/2013/03/k_oconnor_lge-300x138.jpg" class="content attachment-medium wp-post-image" alt="Kim O'Connor">
<span class="social-content content">
OFFICIAL SITE
</span>
</div>
.wrapper:hover .content {
/*styles*/ }

Issue with designing a website - css/html

I have a little problem at designing a website:
In this website a have a top navigation bar and is composed by : number of search results found, search bar, login methods.
All i am asking for is how i can set the "websitelocation" div and search input aligned to the left and "loginMethods" div aligned to the right (in topbar of course).
I want to mention that i tried on loginMethods div left:0; css property but it did nothing.
Here is a jsfiddle setup of layout : http://jsfiddle.net/UZSpz/ .
Code :
html
<body>
<nav>
<h1 class="logo">project</h1>
<ul>
<li id="events_list">
<a href="#events">
<img src="img/menu/services2.png" width="35px" height="35px" style="margin-top:0px;margin-bottom:0xp;padding:0px;" />
<p class="eName">Events</p>
</a>
</li>
<li id="users_list">
<a href="#following">
<img src="img/menu/crowdsourcing.png" width="35px" height="35px" style="margin-top:0px;margin-bottom:0xp;padding:0px;" />
<p class="eName">Users</p>
</a>
</li>
<li>
<a href="#messages">
<img src="img/menu/comment25.png" width="35px" height="35px" style="margin-top:0px;margin-bottom:0xp;padding:0px;" />
<p class="eName">Messages</p>
</a>
</li>
</ul>
</nav>
<div class="topbar">
<div class="websiteLocation">
<img src="img/dark.png" width="25px" height="15px" style="margin-top:10px;margin-right:7px;" />3 events found..
</div>
<input type="text" class="inputSearch" value="Search events.." />
<div class="loginMethods">asdasds</div>
</div>
<div class="content">
content
</div>
</body>
css
html, body {
background: #343434;
height: 100%;
overflow: hidden;
position: relative;
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
}
/* NAVIGATION RULES (left bar) */
nav {
background: #565656;
color: #b4b4b4;
margin:0px;
top: 0;
bottom: 0;
left: 0;
position: absolute;
border-right:7px solid #2b2b2b;
width: 86px;
}
nav .logo {
opacity: 0.5;
background-color: rgb(44, 44, 44);
background-image:url('../img/logo2.png');
height:60px;
border-bottom:1px solid #353535;
margin:0px;
padding:0px;
}
nav a {
text-decoration: none;
cursor:pointer;
margin: 0px;
padding: 0px;
}
nav .logo:hover {
opacity: 1;
background-position-x: 0%;
background-position-y: 100%;
background-size: initial;
background-repeat-x: no-repeat;
background-repeat-y: no-repeat;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: rgb(44, 44, 44);
-moz-transition: opacity .7s;
-webkit-transition: opacity .7s;
-o-transition: opacity .7s;
}
nav ul {
list-style-type: none;
padding: 0px;
margin: 0px;
}
nav li {
opacity: 1;
color:#b4b4b4;
cursor: pointer;
background: #676767;
border-bottom: 1px solid #494949;
padding: 10px 0 16px;
height:59px;
text-align: center;
margin: 0px;
}
nav li:hover {
background: #414242;
-moz-transition: background-color .5s;
-webkit-transition: background-color .5s;
-o-transition: background-color .5s;
}
nav li a {
text-decoration: none;
color:#b4b4b4;
font-size: 1.18em;
}
.eName {
font-family: 'Alegreya Sans SC', sans-serif;
font-size: 14px;
text-decoration: bold;
}
/* MENU CLASSES AND ELEMENTS */
.categories {
display: none;
position: absolute;
width:200px;
background:#383838;
top:0;
left:93px;
bottom:0;
z-index:11;
border-right: 7px solid #0a0a0a;
}
.categoryCapHolder{
width:100%;
height:40px;
padding-top:20px;
background: #2a2a2a;
border-bottom: 1px solid #3d3d3d;
}
.categoryCapHolder .categoryName {
overflow: hidden;
color:#a2a2a2;
font-family: 'Yanone Kaffeesatz', sans-serif;
font-size: 20px;
text-decoration: bold;
text-transform: uppercase;
margin-left:25px;
}
.categoryCapHolder .categoryName:hover {
color:#62c6ff;
}
.categories .subcategory {
width:170px;
height:32px;
padding-top: 10px;
padding-left:30px;
border-bottom: 1px solid #5f5f5f;
background: transparent;
overflow: hidden;
}
.categories .subcategory:hover {
background: #282828;
}
.categories .subcategory .subcategory_link {
margin-left:15px;
color:#62c6ff;
font-family: 'Yanone Kaffeesatz', sans-serif;
font-size: 16px;
text-decoration: bold;
text-transform: uppercase;
}
/* Top navigation bar rules */
.topbar {
z-index: 0;
background: #1d1d1d;
border-left: 7px solid #2b2b2b;
border-bottom: 1px solid #5b5b5b;
height: 60px;
left: 86px;
position: absolute;
right: 0;
top: 0;
}
/*######CUSTOMBTNS########*/
.topbar .websiteLocation {
color:#b4b4b4;
margin-left:50px;
margin-top:10px;
margin-right: 5px;
width: 150px;
overflow: hidden;
font-family: "Calligraffitti", sans-serif;
font-size:16px;
}
.topbar .inputSearch {
font-family: "Calligraffitti", sans-serif;
text-decoration: none;
background: url("../img/search.png") left no-repeat;
padding-left: 25px;
padding-top: 3px;
margin-top:5px;
margin-bottom:5px;
margin-left:5px;
right:0px;
width:150px;
height:23px;
border: 0px;
color:#b6b6b6;
}
.topbar .inputSearch:focus {
outline-color: transparent;
outline-style: none;
}
.loginMethods {
width:150px;
left:0;
}
/* Content rules */
.content {
bottom: 0;
left: 120px;
overflow: auto;
position: absolute;
right: 0;
top: 62px;
padding: 50px 25px 25px 20px;
}
.content .card {
background: #0e0e0e;
color:#a4a4a4;
width:250px;
height:320px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
margin-right:20px;
margin-bottom: 15px;
overflow: hidden;
float: left;
z-index: 1;
}
.content .card .cover {
max-width:250px;
max-height:140px;
background: transparent;
float:left;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topleft: 6px;
-moz-border-radius-topright: 6px;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
.content .card .description {
width:100%;
height:50%;
display: block;
margin-top:150px;
}
.content .card .coverDetail {
position:absolute;
display: none;
color:#565656;
width:220px;
height:22px;
margin: 115px 0px 0px 0px;
padding-left:15px;
padding-right:15px;
background: #e8ff28;
border-top: 1px solid #ecf97e;
overflow:hidden;
z-index:10;
}
.content .card .coverDetail .save {
width:50px;
height:16px;
background:#565656;
color:#c4c4c4;
padding:1px 2px 4px 2px;
cursor:pointer;
border:0px;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
margin:1px 4px 0px 1px;
text-align: center;
}
.content .card .coverDetail .card-views {
width:50px;
height:16px;
background-size: 16px 16px;
padding:1px 2px 4px 2px;
border:0px;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
margin:1px 4px 0px 1px;
text-align: center;
}
.content .card .description .title {
color:#b4b4b4;
font-family: 'Yanone Kaffeesatz', sans-serif;
font-size: 20px;
text-decoration: none;
text-transform: capitalize;
margin-top:5px;
margin-left:10px;
overflow: hidden;
}
.content .card .description .title:hover {
color:#62c6ff;
border-bottom: 1px dotted #d9f1ff;
}
.content .card .description .text {
font-family: sans-serif;
font-size: 11px;
text-decoration: none;
text-transform: uppercase;
height: 80px;
margin-top: 5px;
margin-left: 10px;
width:90%;
overflow-y:hidden;
overflow-x:hidden;
}
.content .card .description .text .expand-card {
background:#565656;
color:#c4c4c4;
padding:2px 2px 2px 2px;
cursor:pointer;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
width:75px;
height:16px;
margin:2px 1px 0px 1px;
text-align: center;
}
.content .card .description .author {
background:url('../img/user91.png');
background-size:10px 10px;
background-repeat:no-repeat;
color:#62c6ff;
bottom: 0;
font-family: sans-serif;
text-decoration: none;
text-transform: lowercase;
font-size: 9px;
padding-left:10px;
margin-left: 10px;
margin-top: 5px;
}
.authorlink {
text-decoration: none;
color:#62c6ff;
}
.content .card .description .category {
background:url('../img/category.png');
background-size:13px 13px;
background-repeat:no-repeat;
color:#62c6ff;
font-family: sans-serif;
text-decoration: none;
text-transform: lowercase;
font-size: 9px;
padding-left: 13px;
margin-left: 10px;
margin-top: 5px;
}
.categorylink {
text-decoration: none;
color: #62c6ff;
text-transform: capitalize;
}
Sorry if i've done something wrong in my code .
Thank you!
DEMO
Add this to your CSS:
.websiteLocation{
float:left;
}
.loginMethods{
float:right;
}
.loginMethods has black text on dark grey background, so is hard to see, but it's there.
left, right, top, bottom only works with position:absolute and position:fixed.
.topbar .inputSearch {
position: absolute;
font-family: "Calligraffitti", sans-serif;
text-decoration: none;
background: url("../img/search.png") left no-repeat;
padding-left: 25px;
margin-bottom:5px;
margin-left:5px;
right:0px;
width:150px;
height:23px;
border: 0px;
color:#b6b6b6;
}
.loginMethods {
width:150px;
position: absolute;
left:0;
}
and you can use another method in Table
<input type="text" class="inputSearch" placeholder="Search events.." />