I have a button created with css on a web application, when I test the button on chrome on android the button renders fine and stays on top of everything because of the z-index property:
But when I test the same thing on chrome on IOS it doesnt renders the button the way its supposed to be and doesnt respect the z-index property:
I tried to add "-webkit-appearance: none;" to the css but it didnt worked heres the css and html:
#PINPOINT {
-webkit-appearance: none;
width: 70px;
height: 70px;
margin: 15px auto;
position: relative;
z-index: 5000;
}
#BUTTON {
-webkit-appearance: none;
box-sizing: border-box;
color: rgba(0, 0, 0, 0.870588);
height: 70px;
text-align: left;
width: 70px;
column-rule-color: rgba(0, 0, 0, 0.870588);
perspective-origin: 227.828px 35px;
transform-origin: 227.828px 35px;
border: 0px none rgba(0, 0, 0, 0.870588);
font: normal normal normal normal 14px / 21px Roboto, sans-serif;
outline: rgba(0, 0, 0, 0.870588) none 0px;
position: fixed;
right: 0;
}
#TEXT {
-webkit-appearance: none;
bottom: 0px;
box-shadow: rgba(0, 0, 0, 0.156863) 0px 2px 5px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 10px 0px;
box-sizing: border-box;
color: rgb(255, 255, 255);
cursor: pointer;
display: inline-block;
height: 55.5px;
left: 0px;
letter-spacing: 0.5px;
position: relative;
right: 0px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
top: 0px;
vertical-align: middle;
width: 55.5px;
will-change: opacity, transform;
z-index: 1;
column-rule-color: rgb(255, 255, 255);
perspective-origin: 27.75px 27.75px;
transform-origin: 27.75px 27.75px;
background: rgb(239, 83, 80) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(255, 255, 255);
border-radius: 50% 50% 50% 50%;
font: normal normal normal normal 14px / 56px Roboto, sans-serif;
margin: 0px 0px 14px;
outline: rgb(255, 255, 255) none 0px;
overflow: hidden;
transition: all 0.3s ease-out 0s;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>
<div id="PINPOINT">
<div id="BUTTON">
<i class="fa fa-reply" aria-hidden="true"></i>
</div>
</div>
You may use flexbox to make them align horizontally and vertically center. Here's the code.
#PINPOINT {
-webkit-appearance: none;
width: 70px;
height: 70px;
margin: 15px auto;
position: relative;
z-index: 5000;
}
#BUTTON {
-webkit-appearance: none;
box-sizing: border-box;
color: rgba(0, 0, 0, 0.870588);
height: 70px;
text-align: left;
width: 70px;
column-rule-color: rgba(0, 0, 0, 0.870588);
perspective-origin: 227.828px 35px;
transform-origin: 227.828px 35px;
border: 0px none rgba(0, 0, 0, 0.870588);
font: normal normal normal normal 14px / 21px Roboto, sans-serif;
outline: rgba(0, 0, 0, 0.870588) none 0px;
position: fixed;
right: 0;
}
#TEXT {
-webkit-appearance: none;
box-shadow: rgba(0, 0, 0, 0.156863) 0px 2px 5px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 10px 0px;
box-sizing: border-box;
color: rgb(255, 255, 255);
cursor: pointer;
height: 55.5px;
letter-spacing: 0.5px;
position: relative;
text-align: center;
text-decoration: none;
text-transform: uppercase;
vertical-align: middle;
width: 55.5px;
will-change: opacity, transform;
z-index: 1;
transform-origin: 27.75px 27.75px;
background: rgb(239, 83, 80) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(255, 255, 255);
border-radius: 50% 50% 50% 50%;
font: normal normal normal normal 14px / 56px Roboto, sans-serif;
margin: 0px 0px 14px;
outline: rgb(255, 255, 255) none 0px;
overflow: hidden;
transition: all 0.3s ease-out 0s;
/*Use flexbox property to fix this.*/
display: flex;
justify-content: center;
align-items:center;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
<div id="PINPOINT">
<div id="BUTTON">
<i class="fa fa-reply" aria-hidden="true"></i>
</div>
</div>
Related
I have the following navigation menu: https://jsfiddle.net/LauraStoian/5kmo0v7e/ 4.
body {
border: solid 3px black;
}
#UL_1 {
align-items: stretch;
block-size: 103px;
box-sizing: border-box;
display: flex;
height: 103px;
inline-size: 241.828px;
justify-content: flex-end;
letter-spacing: 0.16px;
margin-block-end: 0px;
margin-block-start: 0px;
margin-inline-start: 141.453px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
padding-inline-start: 0px;
perspective-origin: 120.906px 51.5px;
text-size-adjust: 100%;
transform-origin: 120.914px 51.5px;
width: 241.828px;
flex: 1 1 auto;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
margin: 0px 0px 0px 141.453px;
padding: 0px;
}
/*#UL_1*/
#UL_1:after {
block-size: 0px;
box-sizing: border-box;
clear: both;
content: '"' '"';
display: table;
height: 0px;
inline-size: 0px;
letter-spacing: 0.16px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 0px 0px;
text-size-adjust: 100%;
transform-origin: 0px 0px;
width: 0px;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#UL_1:after*/
#UL_1:before {
block-size: 0px;
box-sizing: border-box;
content: '"' '"';
display: table;
height: 0px;
inline-size: 0px;
letter-spacing: 0.16px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 0px 0px;
text-size-adjust: 100%;
transform-origin: 0px 0px;
width: 0px;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#UL_1:before*/
#LI_2 {
align-items: center;
block-size: 103px;
bottom: 0px;
box-sizing: border-box;
display: flex;
height: 103px;
inline-size: 72.875px;
left: 0px;
letter-spacing: 0.16px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 36.4375px 51.5px;
position: relative;
right: 0px;
text-size-adjust: 100%;
top: 0px;
transform-origin: 36.4375px 51.5px;
width: 72.875px;
flex-flow: column nowrap;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_2*/
#LI_2:after {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_2:after*/
#LI_2:before {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_2:before*/
#A_3 {
align-items: center;
block-size: 103px;
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
bottom: 0px;
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: flex;
height: 103px;
inline-size: 72.875px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
padding-block-end: 10px;
padding-block-start: 10px;
padding-inline-end: 15px;
padding-inline-start: 15px;
perspective-origin: 36.4375px 51.5px;
position: relative;
right: 0px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
top: 0px;
transform-origin: 36.4375px 51.5px;
white-space: nowrap;
width: 72.875px;
border: 0px none rgb(0, 0, 0);
flex: 1 1 auto;
flex-flow: row wrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
padding: 10px 15px;
transition: all 0.3s ease 0s;
}
/*#A_3*/
#A_3:after {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_3:after*/
#A_3:before {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_3:before*/
#SPAN_4,
#SPAN_12,
#SPAN_18 {
block-size: 0px;
box-sizing: border-box;
cursor: pointer;
display: block;
height: 0px;
inline-size: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 0px 0px;
text-align: left;
text-size-adjust: 100%;
transform-origin: 0px 0px;
white-space: nowrap;
width: 0px;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_4, #SPAN_12, #SPAN_18*/
#SPAN_4:after,
#SPAN_12:after,
#SPAN_18:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_4:after, #SPAN_12:after, #SPAN_18:after*/
#SPAN_4:before,
#SPAN_12:before,
#SPAN_18:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_4:before, #SPAN_12:before, #SPAN_18:before*/
#SPAN_5 {
block-size: 26px;
bottom: 0px;
box-sizing: border-box;
cursor: pointer;
display: block;
height: 26px;
inline-size: 42.875px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 21.4375px 13px;
position: relative;
right: 0px;
text-align: left;
text-size-adjust: 100%;
top: 0px;
transform-origin: 21.4375px 13px;
white-space: nowrap;
width: 42.875px;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_5*/
#SPAN_5:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_5:after*/
#SPAN_5:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_5:before*/
#SPAN_6,
#SPAN_14,
#SPAN_20 {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
perspective-origin: 0px 0px;
text-align: left;
text-size-adjust: 100%;
transform-origin: 0px 0px;
white-space: nowrap;
z-index: 0;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_6, #SPAN_14, #SPAN_20*/
#SPAN_6:after,
#SPAN_14:after,
#SPAN_20:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_6:after, #SPAN_14:after, #SPAN_20:after*/
#SPAN_6:before,
#SPAN_14:before,
#SPAN_20:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_6:before, #SPAN_14:before, #SPAN_20:before*/
#SPAN_7,
#SPAN_15,
#SPAN_21 {
bottom: 0px;
box-sizing: border-box;
cursor: pointer;
left: 0px;
letter-spacing: 0.3px;
perspective-origin: 0px 0px;
position: relative;
right: 0px;
text-align: left;
text-size-adjust: 100%;
top: 0px;
transform-origin: 0px 0px;
white-space: nowrap;
z-index: 2;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_7, #SPAN_15, #SPAN_21*/
#SPAN_7:after,
#SPAN_15:after,
#SPAN_21:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_7:after, #SPAN_15:after, #SPAN_21:after*/
#SPAN_7:before,
#SPAN_15:before,
#SPAN_21:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_7:before, #SPAN_15:before, #SPAN_21:before*/
#SPAN_8 {
align-items: center;
block-size: 36px;
box-sizing: border-box;
cursor: pointer;
display: none;
height: 36px;
inline-size: 36px;
justify-content: center;
letter-spacing: 0.3px;
margin-inline-start: 18px;
position: absolute;
text-align: left;
text-size-adjust: 100%;
top: 50%;
white-space: nowrap;
width: 36px;
z-index: 3;
border-radius: 3px;
font: 700 18px / 26px Arial, sans-serif;
list-style: outside none none;
margin: 0px 0px 0px 18px;
}
/*#SPAN_8*/
#SPAN_8:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 18px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_8:after*/
#SPAN_8:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 18px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_8:before*/
#I_9 {
box-sizing: border-box;
cursor: pointer;
display: inline-block;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 18px / 18px FontAwesome;
list-style: outside none none;
}
/*#I_9*/
#I_9:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 18px / 18px FontAwesome;
list-style: outside none none;
}
/*#I_9:after*/
#I_9:before {
box-sizing: border-box;
content: '""';
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 18px / 18px FontAwesome;
list-style: outside none none;
}
/*#I_9:before*/
#LI_10 {
align-items: center;
block-size: 103px;
box-sizing: border-box;
display: flex;
height: 103px;
inline-size: 74.8281px;
letter-spacing: 0.16px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 37.4062px 51.5px;
text-size-adjust: 100%;
transform-origin: 37.4141px 51.5px;
width: 74.8281px;
flex-flow: column nowrap;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_10*/
#LI_10:after {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_10:after*/
#LI_10:before {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_10:before*/
#A_11 {
align-items: center;
block-size: 103px;
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
bottom: 0px;
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: flex;
height: 103px;
inline-size: 74.8281px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
padding-block-end: 10px;
padding-block-start: 10px;
padding-inline-end: 15px;
padding-inline-start: 15px;
perspective-origin: 37.4062px 51.5px;
position: relative;
right: 0px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
top: 0px;
transform-origin: 37.4141px 51.5px;
white-space: nowrap;
width: 74.8281px;
border: 0px none rgb(0, 0, 0);
flex: 1 1 auto;
flex-flow: row wrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
padding: 10px 15px;
transition: all 0.3s ease 0s;
}
/*#A_11*/
#A_11:after {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_11:after*/
#A_11:before {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_11:before*/
#SPAN_13 {
block-size: 26px;
bottom: 0px;
box-sizing: border-box;
cursor: pointer;
display: block;
height: 26px;
inline-size: 44.8281px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 22.4062px 13px;
position: relative;
right: 0px;
text-align: left;
text-size-adjust: 100%;
top: 0px;
transform-origin: 22.4141px 13px;
white-space: nowrap;
width: 44.8281px;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_13*/
#SPAN_13:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_13:after*/
#SPAN_13:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_13:before*/
#LI_16 {
align-items: center;
block-size: 103px;
box-sizing: border-box;
display: flex;
height: 103px;
inline-size: 94.125px;
letter-spacing: 0.16px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 47.0625px 51.5px;
text-size-adjust: 100%;
transform-origin: 47.0625px 51.5px;
width: 94.125px;
flex-flow: column nowrap;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_16*/
#LI_16:after {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_16:after*/
#LI_16:before {
box-sizing: border-box;
display: block;
letter-spacing: 0.16px;
text-size-adjust: 100%;
font: 16px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#LI_16:before*/
#A_17 {
align-items: center;
block-size: 103px;
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
bottom: 0px;
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: flex;
height: 103px;
inline-size: 94.125px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
padding-block-end: 10px;
padding-block-start: 10px;
padding-inline-end: 15px;
padding-inline-start: 15px;
perspective-origin: 47.0625px 51.5px;
position: relative;
right: 0px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
top: 0px;
transform-origin: 47.0625px 51.5px;
white-space: nowrap;
width: 94.125px;
border: 0px none rgb(0, 0, 0);
flex: 1 1 auto;
flex-flow: row wrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
padding: 10px 15px;
transition: all 0.3s ease 0s;
}
/*#A_17*/
#A_17:after {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_17:after*/
#A_17:before {
border-block-end-color: rgb(0, 0, 0);
border-block-start-color: rgb(0, 0, 0);
border-inline-end-color: rgb(0, 0, 0);
border-inline-start-color: rgb(0, 0, 0);
box-sizing: border-box;
caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0);
column-rule-color: rgb(0, 0, 0);
display: block;
letter-spacing: 0.3px;
text-align: left;
text-decoration: none solid rgb(0, 0, 0);
text-size-adjust: 100%;
white-space: nowrap;
border: 0px none rgb(0, 0, 0);
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
outline: rgb(0, 0, 0) none 0px;
}
/*#A_17:before*/
#SPAN_19 {
block-size: 26px;
bottom: 0px;
box-sizing: border-box;
cursor: pointer;
display: block;
height: 26px;
inline-size: 64.125px;
left: 0px;
letter-spacing: 0.3px;
min-block-size: auto;
min-height: auto;
min-inline-size: auto;
min-width: auto;
perspective-origin: 32.0625px 13px;
position: relative;
right: 0px;
text-align: left;
text-size-adjust: 100%;
top: 0px;
transform-origin: 32.0625px 13px;
white-space: nowrap;
width: 64.125px;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_19*/
#SPAN_19:after {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_19:after*/
#SPAN_19:before {
box-sizing: border-box;
cursor: pointer;
letter-spacing: 0.3px;
text-align: left;
text-size-adjust: 100%;
white-space: nowrap;
font: 700 15px / 26px Arial, sans-serif;
list-style: outside none none;
}
/*#SPAN_19:before*/
#SPAN_5:hover,
#SPAN_13:hover,
#SPAN_19:hover {
border-bottom-style: solid;
border-bottom-width: 3px;
border-bottom-color: red;
}
<body>
<ul id="UL_1">
<li id="LI_2">
<span id="SPAN_4"></span> <span id="SPAN_5"><span id="SPAN_6"></span> <span id="SPAN_7">Home <span id="SPAN_8"><i id="I_9"></i></span></span></span>
</li>
<li id="LI_10">
<span id="SPAN_12"></span> <span id="SPAN_13"><span id="SPAN_14"></span> <span id="SPAN_15">About</span></span>
</li>
<li id="LI_16">
<span id="SPAN_18"></span> <span id="SPAN_19"><span id="SPAN_20"></span> <span id="SPAN_21">Services</span></span>
</li>
</ul>
</body>
The links of the pages have each a hover which consists of a bottom border. The problem is that the hover activates just when the mouse is on the text, instead of working in the whole surrounding area ( full area up and down and a few px in right and left).
The navigation is built with the flexbox. I tried to apply the border to the #A_3 and although the hover area expands, the border-bottom moves too low. Is like a paradox because either I have to move the border too low so that the hover area is bigger or keep the border where it should be but the hover works only on text.
This is because the border is after padding and hover works only on the padding zone. I saw on other websites that this style is done with the after pseudoelement, I tried to do it this way, but it didn’t work.
So, my question is, how can I expand the hover zone while keeping the border-bottom just below the text?
I believe you want to hover your LI and the inner span should get the border.
Updated jsfiddle
In order to do that just update you hover css like below
#LI_2:hover #SPAN_5,
#LI_10:hover #SPAN_13,
#LI_16:hover #SPAN_19 {
border-bottom-style: solid;
border-bottom-width: 3px;
border-bottom-color: red;
}
I'm trying to remove the ring around a material icon that I'm using as a close icon on a draggable element.
Here's a picture of the element (I've changed the background to red for you to highlight the problem), I want to remove the red outer circle so the nice border of the element goes all the way to the edge of the grey circle:
Here's the HTML and CSS for the element and the icon:
HTML:
<div class="print-element">
Tag Number
<mat-icon class="resize-circle">highlight_off</mat-icon>
</div>
CSS:
.print-element {
min-width: 175px;
min-height: 45px;
border: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);
display: inline-flex;
justify-content: center;
align-items: center;
text-align: center;
background: #fff;
border-radius: 4px;
margin-right: 25px 25px 15px 0px;
cursor: move;
position: relative;
z-index: 1;
box-sizing: border-box;
padding: 10px 50px 10px 10px;
transition: box-shadow 200ms cubic-bezier(0, 0, 0.2, 1);
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.resize-circle{
position: absolute;
top: -10px;
right: -10px;
background-color: white;
border: .1px solid white;
border-radius: 50%;
color: #aaa;
cursor: pointer;
}
.mat-icon {
background-repeat: no-repeat;
display: inline-block;
fill: currentColor;
height: 24px;
width: 24px;
}
Now I can change the size of the mat-icon, but that results in the below:
using:
.mat-icon {
background-repeat: no-repeat;
display: inline-block;
fill: currentColor;
height: 20px;
width: 20px;
}
yields:
Here's a stackblitz all set up and ready to go: https://stackblitz.com/edit/angular-m7wwvr?file=src%2Fstyles.scss
Here's what I want it to look like:
Even pointers in the right direction would help.
Check edited URL for the changes in HTML and CSS
https://stackblitz.com/edit/angular-m7wwvr-xrmyje?file=src/styles.scss
Ok here is an answer. I used #Srinivas Bendkhale answer to reach this result.
what I did was wrapping the icon with a span and give it a fix hight and width then all I had to do was to hide the overflow .
That's how it looks in my browser.
.print-element {
min-width: 175px;
min-height: 45px;
border: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);
display: inline-flex;
justify-content: center;
align-items: center;
text-align: center;
background: #fff;
border-radius: 4px;
margin-right: 25px 25px 15px 0px;
cursor: move;
position: relative;
z-index: 1;
box-sizing: border-box;
padding: 10px 50px 10px 10px;
transition: box-shadow 200ms cubic-bezier(0, 0, 0.2, 1);
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.resize-circle {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
border: .1px solid white;
color: #aaa;
cursor: pointer;
}
span {
width: 20px;
height: 20px;
background: white;
position: absolute;
top: -7px;
border-radius: 50%;
right: -7px;
overflow: hidden;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div class="print-element">
Tag Number
<span><i class="material-icons resize-circle">highlight_off</i></span>
</div>
Sorry there isn't more code on this. I am new and stumped to be honest.
I have a CSS Button I am using on my webpage, code below. I'd like to put an image around the button like below... Slightly off center,behind the button itself, and which is mobile responsive.
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 60%;
}
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
The circle image is here:
And I'd like it to look like this:
However, I cannot seem to figure out how to do this.
Thanks,
Alex
.contain {
background: url(https://i.stack.imgur.com/Nb7M7.png);
background-repeat: no-repeat;
width: 60%;
background-size: cover;
}
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 60%;
margin-left: 50%;
transform: translateX(-50%);
}
<div class="contain">
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
</div>
First, you should clean your CSS and optimize it by not duplicating arguments such as "cursor: pointer", which you ca find two times in the code, also the "outline: none" should only be when the button is focused or active.
Either way, to put an image in the background you should do something similar to :
<button class="my_button" type="">My amazing button</button>
.my_button {
/*height, width, color...*/
background-image: url(img/my_img.png);
/* You can even move the image in the background to better suit your needs*/
background-position-y:-50px; /* Move the image on the Y axes*/
background-position-x: 10px; /* Move the image on the X axes*/
background-size: cover;
}
Try to something like this.
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 16px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer; cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
background: url(https://i.stack.imgur.com/Nb7M7.png) no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC{
width: 535px;
min-height:150px;
}
.redbutton p{
background-color: yellow;
height: 35px;
border: 1px solid yellow;
width: 470px;
padding-top: 10px;
}
<div class="redbutton largebuttonwidthC">
<p>Click Here to instantly Download this file</p>
</div>
Not perfect but I guess you will see the idea behind: See this fiddle
.redbutton {
display: inline-block;
z-index: 10;
position: relative;
outline: none;
cursor: pointer;
margin: 0 50px;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 300px;
}
.container {
position: relative;
margin: 50px;
}
.image {
content: "";
position: absolute;
left: -40px;
right: 0;
bottom: 0;
top: -30px;
background: url('https://i.stack.imgur.com/Nb7M7.png') no-repeat;
z-index: 0;
width: 512px;
height: 90px;
}
<div class="container">
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
<span class="image"></span>
</div>
https://jsfiddle.net/nf7b2zx1/
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
;
color: #faddde;
background: #d81b21;
background: url(https://i.stack.imgur.com/Nb7M7.png) no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 100%;
min-height: 70px
}
<div class="redbutton largebuttonwidthC">IAM TEXT</div>
change the buttons background to that blue circle
background-image: url(you img here...);
With a bit of CSS you can get something similar
.redbutton:before {
content: '';
position:absolute;
left:-20px;
right:-20px;
top:-20px;
bottom:-20px;
background-image: url('https://i.stack.imgur.com/Nb7M7.png');
background-size: 100% 100%;
}
I need to create this button with CSS only and have an issue with box shadow. There are two different shadows on this button: one yellow, one black. The maximum what I get is this
.button {
height: 81px;
width: 250px;
text-align: center;
font-family: 'Celias_Medium', 'Open Sans:500', sans-serif;
font-size: 11px;
line-height: 3.3;
letter-spacing: 0.4px;
cursor: pointer;
outline: none;
display: block;
vertical-align: top;
padding: 23px 0 26px 0;
text-transform: uppercase;
color: #000000;
background-color: #fbfb5c;
box-shadow: 0 20px 90px -30px rgba(251, 251, 92, 0.9), 0 40px 90px -50px rgba(0, 0, 0, 0.5)
}
<div class="button">ADD 7 Activities</div>
Here is result. Is there any other solution to get this result?
try on this if u cant see it on chrome moz or safari
.button {
height: 81px;
width: 250px;
text-align: center;
font-family: 'Celias_Medium', 'Open Sans:500', sans-serif;
font-size: 11px;
line-height: 3.3;
letter-spacing: 0.4px;
cursor: pointer;
outline: none;
display: block;
vertical-align: top;
padding: 23px 0 26px 0;
text-transform: uppercase;
color: #000000;
background-color: #fbfb5c;
box-shadow: 0 20px 90px -30px rgba(251, 251, 92, 0.9), 0 40px 90px -50px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 20px 90px -30px rgba(251, 251, 92, 0.9), 0 40px 90px -50px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0 20px 90px -30px rgba(251, 251, 92, 0.9), 0 40px 90px -50px rgba(0, 0, 0, 0.5);
}
hope this one works :)
Is that what you want?
.button {
height: 81px;
width: 250px;
text-align: center;
font-family: 'Celias_Medium', 'Open Sans:500', sans-serif;
font-size: 11px;
line-height: 3.3;
letter-spacing: 0.4px;
cursor: pointer;
outline: none;
display: block;
vertical-align: top;
padding: 23px 0 26px 0;
box-sizing: border-box;
text-transform: uppercase;
color: #000000;
background-color: #fbfb5c;
box-shadow: 1px 1px 70px -24px;
}
<div class="button">
ADD y activities
</div>
Generally speaking material buttons would look something like this, but I don't really know what you're asking.
.button {
height: 81px;
width: 250px;
text-align: center;
font-family: Celias_Medium, 'Open Sans:500', sans-serif;
font-size: 11px;
line-height: 3.3;
letter-spacing: .4px;
cursor: pointer;
vertical-align: top;
padding: 23px 0 26px;
box-sizing: border-box;
text-transform: uppercase;
background-color: #fbfb5c;
border-radius: 4px;
margin: 16px 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
transition: all .3s cubic-bezier(.25, .8, .25, 1)
}
.button:hover {
box-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .22)
}
<div class="button">
Button no. 1
</div>
<div class="button">
Button no. 2
</div>
<div class="button">
Button no. 3
</div>
<div class="button">
Button no. 4
</div>
<div class="button">
Button no. 5
</div>
I'm having a bit of trouble having my text display only within my image. It's dependent on the length of the text, if it's two rows long, then it'll display correct. Any longer it'll extend past the image. I can fix this by setting the bottom: 25px; for my featured_wrapper but I don't think that's a Good fix. If the text is only 2 rows long then that it sets the text higher than it should. May I ask how should I properly set the text so that it'll always remain within the image.
<div id="featured_item">
<a href="http://bandwagonbible.com/Fitness/GettingSixPackAbs" id="featured_link">
<picture id="featured_picture">
<img src="http://bandwagonbible.com/Stories/Fitness/GettingSixPackAbs/Image2.jpg" id="featured_image" alt='' />
</picture>
<div id="featured_wrapper">
<h3 id="featured_title">
A Beginners Guide To Getting Six Pack Abs ... add in some more text
</h3>
</div>
</a>
</div>
http://codepen.io/anon/pen/eZVdpq
Change the height to auto in your #featured_wrapper rule
#featured_wrapper {
bottom: -2px;
box-sizing: border-box;
color: rgb(40, 173, 230);
height: auto; /* <--- changed to auto */
#featured_item {
box-sizing: border-box;
color: rgb(34, 34, 34);
height: 173.813px;
min-height: auto;
min-width: auto;
overflow-wrap: break-word;
position: relative;
width: 309.297px;
word-wrap: break-word;
perspective-origin: 154.641px 86.9063px;
transform-origin: 154.641px 86.9063px;
border: 0px none rgb(34, 34, 34);
font: normal normal normal normal 16px / 24px ProximaNovaCond, sans-serif;
margin: 0px 21px 0px 0px;
outline: rgb(34, 34, 34) none 0px;
}
#featured_link {
box-sizing: border-box;
color: rgb(40, 173, 230);
display: block;
height: 173.813px;
overflow-wrap: break-word;
text-decoration: none;
width: 309.297px;
word-wrap: break-word;
perspective-origin: 154.641px 86.9063px;
transform-origin: 154.641px 86.9063px;
background: rgb(245, 245, 245) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(40, 173, 230);
font: normal normal normal normal 16px / 24px ProximaNovaCond, sans-serif;
outline: rgb(40, 173, 230) none 0px;
padding: 0px 0px 173.813px;
}
#featured_picture {
box-sizing: border-box;
color: rgb(40, 173, 230);
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
word-wrap: break-word;
border: 0px none rgb(40, 173, 230);
font: normal normal normal normal 16px / 24px ProximaNovaCond, sans-serif;
outline: rgb(40, 173, 230) none 0px;
}
#featured_image {
box-sizing: border-box;
color: rgb(40, 173, 230);
display: inline-block;
height: 173.969px;
max-width: 100%;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
vertical-align: middle;
width: 309.297px;
word-wrap: break-word;
perspective-origin: 154.641px 86.9844px;
transform-origin: 154.641px 86.9844px;
background: rgb(245, 245, 245) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(40, 173, 230);
font: normal normal normal normal 16px / 24px ProximaNovaCond, sans-serif;
outline: rgb(40, 173, 230) none 0px;
overflow: hidden;
}
#featured_wrapper {
bottom: -2px;
box-sizing: border-box;
color: rgb(40, 173, 230);
height: auto;
left: 0px;
overflow-wrap: break-word;
position: absolute;
right: 20px;
width: 289.297px;
word-wrap: break-word;
perspective-origin: 144.641px 45px;
transform-origin: 104.641px 45px;
border: 0px none rgb(40, 173, 230);
font: normal normal normal normal 16px / 24px ProximaNovaCond, sans-serif;
outline: rgb(40, 173, 230) none 0px;
}
#featured_title {
box-sizing: border-box;
color: rgb(255, 255, 255);
display: inline;
height: auto;
overflow-wrap: break-word;
position: relative;
text-rendering: optimizeLegibility;
width: auto;
word-wrap: break-word;
background: rgba(0, 0, 0, 0.701961) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(255, 255, 255);
font: normal normal normal normal 22px / 22px ProximaNovaCond, sans-serif;
margin: 0px 0px 0px;
outline: rgb(255, 255, 255) none 0px;
padding: 0px 10px;
transition: all 0.1s ease-in-out 0s;
}
<div id="featured_item">
<a href="http://bandwagonbible.com/Fitness/GettingSixPackAbs" id="featured_link">
<picture id="featured_picture">
<img src="http://bandwagonbible.com/Stories/Fitness/GettingSixPackAbs/Image2.jpg" id="featured_image" alt='' />
</picture>
<div id="featured_wrapper">
<h3 id="featured_title">
A Beginners Guide To Getting Six Pack Abs ... add in some more text
</h3>
</div>
</a>
</div>
And I don't think you need all that CSS/markup either, so here is a shortened version for you.
#featured_item {
position: relative;
width: 309.297px;
margin: 0px 21px 0px 0px;
}
#featured_link {
display: block;
position: relative;
text-decoration: none;
}
#featured_image {
max-width: 100%;
}
#featured_title {
color: rgb(255, 255, 255);
height: auto;
position: absolute;
left: 0;
right: 0;
bottom: 0;
text-rendering: optimizeLegibility;
background: rgba(0, 0, 0, 0.701961);
font: normal 22px / 22px ProximaNovaCond, sans-serif;
padding: 0px 10px;
transition: all 0.1s ease-in-out 0s;
}
<div id="featured_item">
<a href="http://bandwagonbible.com/Fitness/GettingSixPackAbs" id="featured_link">
<img src="http://bandwagonbible.com/Stories/Fitness/GettingSixPackAbs/Image2.jpg" id="featured_image" alt='' />
<div id="featured_title">
A Beginners Guide To Getting Six Pack Abs ... add in some more text
</div>
</a>
</div>
Remove the height: 50px; in the #featured_wrapper rule and also change the bottom:2px; to 0 to make it be stick to the bottom.
Like this
I also change the display:inline of the text and add a width:100% to make the text adapt the full width of the image.