I am working on a calendar set up and implemented it using a table. However, I am struggling to get the boxes to fill the calendar. My html currently looks like this:
<div id="cal">
<div class="header">
<span class="left button" id="prev"> 〈 </span>
<span class="month-year" id="label"> June 2017 </span>
<span class="right button" id="next"> 〉 </span>
</div>
<table id="days">
<td>sun</td>
<td>mon</td>
<td>tue</td>
<td>wed</td>
<td>thu</td>
<td>fri</td>
<td>sat</td>
</table>
<div id="cal-frame">
<table class="curr">
<tbody>
<tr><td class="nil"></td><td class="nil"></td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr>
<tr><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td class="today">11</td><td>12</td></tr>
<tr><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td></tr>
<tr><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>25</td><td>26</td></tr>
<tr><td>27</td><td>28</td><td>29</td><td>30</td><td class="nil"></td><td class="nil"></td><td class="nil"></td></tr>
</tbody>
</table>
</div>
</div>
and my css looks like this:
#cal {
-moz-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
-webkit-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
margin:50px auto;
font: 13px/1.5 Helvatica, Arial, san-serif;
display:table;
width:50%;
height:70%;
}
#cal .header {
cursor:default;
background: #cd310d;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: #32CD32;
height: 34px;
position: relative;
color:#fff;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-weight:bold;
text-shadow:0px -1px 0 #87260C;
text-transform: uppercase;
}
#cal .header span {
display:inline-block;
line-height:34px;
}
#cal .header .button {
width:24px;
text-align:center;
position:absolute;
}
#cal .header .left.button {
left:0;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
border-right:1px solid #fff;
}
#cal .header .right.button {
right:0;
top:0;
border-left:1px solid #fff;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#cal .header .button:hover {
background: -moz-linear-gradient(top, #d94215, #bb330f);
background: #fff;
color:#808080;
}
#cal .header .month-year {
letter-spacing: 1px;
width: 100%;
text-align: center;
}
#cal table {
background:#fff;
border-collapse:collapse;
table-layout: fixed;
}
#cal td {
height:25%;
width: 17%;
color:#2b2b2b;
position:relative;
line-height:30px;
/*text-align:center;*/
border:1px solid #e6e6e6;
cursor:default;
}
#cal #days td {
height:26px;
line-height: 26px;
text-transform:uppercase;
font-size:90%;
color:#9e9e9e;
}
#cal #days td:not(:last-child) {
border-right:1px solid #fff;
}
#cal #cal-frame td.today {
background:#cccccc;
color:black;
box-shadow:1px 1px 0px #fff inset;
-moz-box-shadow:1px 1px 0px #fff inset;
-webkit-box-shadow:1px 1px 0px #fff inset;
}
#cal #cal-frame td:not(.nil):hover {
color:#fff;
text-shadow: #6C1A07 0px -1px;
background:#CD310D;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: #8c8c8c;
-moz-box-shadow:0px 0px 0px;
-webkit-box-shadow:0px 0px 0px;
}
#cal #cal-frame td span {
font-size:80%;
position:relative;
}
#cal #cal-frame td span:first-child {
bottom:5px;
}
#cal #cal-frame td span:last-child {
top:5px;
}
#cal #cal-frame table.curr {
float:left;
}
#cal #cal-frame table.temp {
position:absolute;
}
I want the boxes to be even and fill the full calendar (they currently do not do so). Any input would be much appreciated. Thank you!
Hey Change the following CSS into
Old One :
#cal td {
height:25%;
width: 17%;
color:#2b2b2b;
position:relative;
line-height:30px;
/*text-align:center;*/
border:1px solid #e6e6e6;
cursor:default;
}
New One :
\#cal td {
height:25%;
width: 1%;
color:#2b2b2b;
position:relative;
line-height:30px;
text-align:center;
border:1px solid #e6e6e6;
cursor:default;
}
Note the change of text-align and width.
Related
I want to change the color of the header, color of the box in the middle (same as the color of header) and the background color, im new to html and css please help me with this i tried everything like finding the hex code of the color blue (#333580) and searching for it on the css, i was able to find it and replace with another color but nothing is changing.
*{
margin:0;
padding:0;
}
body{
background-image: url("../images/bg.jpg") repeat top left;
background-color:#333;
}
h1{
font-size:45px;
}
h1 span{
color:#ffa800;
}
a{
color:#777;
}
a:hover{
color:#222;
}
p{
padding:5px 0px;
}
.header{
margin-left:-20px;
}
.wrapper{
width:960px;
margin:10px auto;
min-height:550px;
background: red;
overflow:auto;
}
.wrapper_admin{
width:960px;
margin:10px auto;
min-height:550px;
background: red;
overflow:auto;
}
.box{
width:49%;
}
.left{
float:left;
}
.right{
float:right;
}
.clear{
clear:both;
}
a.back{
color:#777;
position:fixed;
top:5px;
right:10px;
text-decoration:none;
}
/* Form Style */
.form_wrapper{
background:#fff;
border:1px solid #ddd;
margin:0 auto;
width:350px;
font-size:16px;
-moz-box-shadow:1px 1px 7px #ccc;
-webkit-box-shadow:1px 1px 7px #ccc;
box-shadow:1px 1px 7px #ccc;
}
.form_wrapper h3{
padding:40px 30px 20px 30px;
background-color:#444;
color:#fff;
font-size:25px;
border-bottom:1px solid #ddd;
}
.form_wrapper form{
display:none;
background:#fff;
}
.form_wrapper .column{
width:47%;
float:left;
}
form.active{
display:block;
}
form.login{
width:350px;
}
form.register{
width:550px;
}
form.forgot_password{
width:300px;
}
.form_wrapper a{
text-decoration:none;
color:#777;
font-size:12px;
}
.form_wrapper a:hover{
color:#000;
}
.form_wrapper label{
display:block;
padding:10px 30px 0px 30px;
margin:10px 0px 0px 0px;
}
.form_wrapper input[type="text"],
.form_wrapper input[type="password"]{
border: solid 1px #E5E5E5;
background: #FFFFFF;
margin: 5px 30px 0px 30px;
padding: 9px;
display:block;
font-size:16px;
width:76%;
background:
-webkit-gradient(
linear,
left top,
left 25,
from(#FFFFFF),
color-stop(4%, #EEEEEE),
to(#FFFFFF)
);
background:
-moz-linear-gradient(
top,
#FFFFFF,
#EEEEEE 1px,
#FFFFFF 25px
);
-moz-box-shadow: 0px 0px 8px #f0f0f0;
-webkit-box-shadow: 0px 0px 8px #f0f0f0;
box-shadow: 0px 0px 8px #f0f0f0;
}
.form_wrapper input[type="text"]:focus,
.form_wrapper input[type="password"]:focus{
background:#feffef;
}
.form_wrapper .bottom{
background-color:#444;
border-top:1px solid #ddd;
margin-top:20px;
clear:both;
color:#fff;
text-shadow:1px 1px 1px #000;
}
.form_wrapper .bottom a{
display:block;
clear:both;
padding:10px 30px;
text-align:right;
color:#ffa800;
text-shadow:1px 1px 1px #000;
}
.form_wrapper a.forgot{
float:right;
font-style:italic;
line-height:24px;
color:#ffa800;
text-shadow:1px 1px 1px #fff;
}
.form_wrapper a.forgot:hover{
color:#000;
}
.form_wrapper div.remember{
float:left;
width:140px;
margin:20px 0px 20px 30px;
font-size:11px;
}
.form_wrapper div.remember input{
float:left;
margin:2px 5px 0px 0px;
}
.form_wrapper span.error{
color:red;
font-size:11px;
font-style:italic;
display:block;
margin:15px 30px;
}
.form_wrapper input[type="submit"] {
background: #e3e3e3;
border: 1px solid #ccc;
color: #333;
font-family: "Trebuchet MS", "Myriad Pro", sans-serif;
font-size: 14px;
font-weight: bold;
padding: 8px 0 9px;
text-align: center;
width: 150px;
cursor:pointer;
float:right;
margin:15px 20px 10px 10px;
text-shadow: 0px 1px 0px #fff;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: 0px 0px 2px #fff inset;
-webkit-box-shadow: 0px 0px 2px #fff inset;
box-shadow: 0px 0px 2px #fff inset;
}
.form_wrapper input[type="submit"]:hover {
background: #d9d9d9;
-moz-box-shadow: 0px 0px 2px #eaeaea inset;
-webkit-box-shadow: 0px 0px 2px #eaeaea inset;
box-shadow: 0px 0px 2px #eaeaea inset;
color: #222;
}
.clock{
float:Right;
margin-right:-80px;
}
.date{
float:left;
margin-right:50px;
margin-top:30px;
}
.trans{
background:transparent;
border:none;
font-size:17px;
font-family:Century Gothic;
}
.popup
{
position: fixed;
width: 100%;
opacity: 0.9;
top:0px;
min-height:200px;
height:100%;
z-index: 100;
background: #FFFFFF;
font-size: 20px;
text-align: center;
/* display:none; */
}
HTML LOGIN PAGE(index.php)
<html>
<body>
<link rel="stylesheet" type="text/css" href="admin/css/style.css" />
<html>
<head>
<title>ABE E-Voting System</title>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand">
<img src="ABE.jpg" width="135" height="60">
</a>
<a class="brand">
<h2>E-Voting System</h2>
<div class="chmsc_nav"><font size="4" color="white">CABANATUAN</font></div>
</a>
</div>
</div>
</div>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" media="screen, projection" />
<link rel="stylesheet" href="css/font-awesome.css"/>
<link rel="stylesheet" type="text/css" href="css/Home.css" media="screen, projection" />
</body>
</html>
<div class="wrapper_admin">
</br>
</br>
</br>
<div id="element" class="hero-body-index">
<div id="loginform">
<p><font color="white"><h2>Login</h2></font></p>
<form action="loginprocess.php" method="POST" >
<table>
<tr><td><font color="white">Username<br>or USN:</font> </td><td><input type="text" name="username" id="username" maxlength="11" required></td></tr>
<tr><td><p><td></tr>
<tr><td><font color="white">Password:</font> </td><td><input type="Password" name="password" id="password" maxlength="50" required></td></tr>
<tr><td><p><td></tr>
<tr><td></td><td><button class="btn btn-primary" value="Login"><i class="icon-ok icon-large"></i> Login</button><p>
</td></tr>
<tr><td><font color="white" size=2>No account?<td><a href='register.php'><font size=2>Register!</a></font>
</td><tr>
</form>
</table>
</div>
</div>
</br>
</br>
</br>
</br>
</br>
<hr>
<footer>
<div class="foot_center"><p>Copyright © 2018 ABE CABANATUAN
<br>
-------------Programmed by------------
<br>Jordan J. Santos - John Marlou Agulto</div>
</div>
</footer></div>
</body>
</html>
So I have been following this tutorial for making a calendar widget with html, css, and js but I am stuck on the CSS not working. Did I miss something or miss-type? Where is my html/css going wrong to not end up the same final result? When I try to edit certain CSS it doesn't seem to affect the output.
The tutorial is here for reference to how it is suppose to look like.
Here is my HTML:
#cal {
-moz-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25);
-webkit-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25);
margin: 50px auto;
font: 13px/1.5"Helvetica Neue", Helvatica, Arial, san-serif;
display: table;
}
#cal .header {
cursor: default;
background: #cd310d;
background: -mozlinear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
height: 34px;
position: relative;
color: #fff;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-weight: bold;
text-shadow: 0px -1px 0 #87260C;
text-transform: uppercase;
}
#cal .header span {
display: inline-block;
line-height: 34px;
}
#cal .header .hook {
width: 9px;
height: 28px;
position: absolute;
bottom: 60%;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
background: #ececec;
background: -moz-linear-gradient(right top, #fff, #827e7d);
background: -webkit-gradient(linear, right top, right bottom, from(#fff), to(#827e7d);
box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
-moz-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
-webkit-box-shadow: 0px -1px 2px rgba(0, 0, 0, 0.65);
}
.right.hook {
right: 15%;
}
.left.hook {
left: 15%;
}
#cal .header .button {
width: 24px;
text-align: center;
position: absolute;
}
#cal .header .left.button {
left: 0;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
border-right: 1px solid #ae2a0c;
}
#cal .header .right.button {
right: 0;
top: 0;
border-left: 1px solid #ae2a0c;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#cal .header .button:hover {
background: -moz-linear-gradient(top, #d94215, #bb330f);
background: -webkit-gradient(linear, left top, left bottom, from (#d94215), to(#bb330f));
}
#cal .header .month-year {
letter-spacing: 1px;
width: 100%;
text-align: center;
}
#cal table {
background: #fff;
border-collapse: collapse;
}
#cal td {
color: #2b2b2b;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
border: 1px solid #e6e6e6;
cursor: default;
}
#cal #days td {
height: 25px;
line-height: 26px;
text-transform: uppercase;
font-size: 90%;
color: #9e9e9e;
}
#cal #days td:not(:last-child) {
border-right: 1px solid #fff;
}
#cal #cal-frame td.today {
background: #ededed;
color: #8c8c8c;
box-shadow: 1px 1px 0px #fff inset;
-moz-box-shadow: 1px 1px 0px #fff inset;
-webkit-box-shadow: 1px 1px 0px #fff inset;
}
#cal #cal-frame td:not(.nil):hover {
color: #fff;
text-shadow: #6C1A07 0px -1px;
background: #CD310D;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
-moz-box-shadow: 0px 0px 0px;
-webkit-box-shadow: 0px 0px 0px;
}
#cal #cal-frame td span {
font-size: 80%;
position: relative;
}
#cal #cal-frame td span:first-child {
bottom: 5px;
}
#cal #cal-frame td span:last-child {
top: 5px;
}
#cal #cal-frame table.curr {
float: left;
}
#cal #cal-frame table.temp {
position: absolute;
}
<div id="cal">
<div class="header">
<span class="left button" id="prev"> 〈 </span>
<span class="left hook"></span>
<span class="month-year" id="label"> June 2010 </span>
<span class="right hook"></span>
<span class="right button" id="next"> 〉 </span>
</div>
<table id="days">
<tr>
<td>sun</td>
<td>mon</td>
<td>tue</td>
<td>wed</td>
<td>fri</td>
<td>sat</td>
</tr>
</table>
<div id="cal-frame">
<table class="curr">
<tbody>
<tr>
<td class="nil"></td>
<td class="nil"></td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td class="today">11</td>
<td>12</td>
</tr>
<tr>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
</tr>
<tr>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
</tr>
<tr>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td class="nil"></td>
<td class="nil"></td>
<td class="nil"></td>
</tr>
</tbody>
</table>
</div>
</div>
First I couldn't understand what is you actual query.
But the link you are referring is having a perfectly working CSS and HTML.
Plus the JS is also working.
The difference I found in the code you have provided are :-
Within the HTML:-
<table id="days">
<td>thu</td> <!-- Is missing -->
In the CSS :- (Use the below CSS totally)
body {
background: #e0e0e0;
}
#cal {
-moz-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
-webkit-box-shadow:0px 3px 3px rgba(0, 0, 0, 0.25);
margin:50px auto;
font: 13px/1.5 "Helvetica Neue", Helvatica, Arial, san-serif;
display:table;
}
#cal .header {
cursor:default;
background: #cd310d;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
height: 34px;
position: relative;
color:#fff;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-weight:bold;
text-shadow:0px -1px 0 #87260C;
text-transform: uppercase;
}
#cal .header span {
display:inline-block;
line-height:34px;
}
#cal .header .hook {
width: 9px;
height: 28px;
position: absolute;
bottom:60%;
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
background:#ececec;
background: -moz-linear-gradient(right top, #fff, #827e7d);
background: -webkit-gradient(linear, right top, right bottom, from(#fff), to(#827e7d));
box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
-moz-box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
-webkit-box-shadow:0px -1px 2px rgba(0, 0, 0, 0.65 );
}
.right.hook {
right:15%;
}
.left.hook {
left: 15%;
}
#cal .header .button {
width:24px;
text-align:center;
position:absolute;
}
#cal .header .left.button {
left:0;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
border-right:1px solid #ae2a0c;
}
#cal .header .right.button {
right:0;
top:0;
border-left:1px solid #ae2a0c;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#cal .header .button:hover {
background: -moz-linear-gradient(top, #d94215, #bb330f);
background: -webkit-gradient(linear, left top, left bottom, from(#d94215), to(#bb330f));
}
#cal .header .month-year {
letter-spacing: 1px;
width: 100%;
text-align: center;
}
#cal table {
background:#fff;
border-collapse:collapse;
}
#cal td {
color:#2b2b2b;
width:30px;
height:30px;
line-height:30px;
text-align:center;
border:1px solid #e6e6e6;
cursor:default;
}
#cal #days td {
height:26px;
line-height: 26px;
text-transform:uppercase;
font-size:90%;
color:#9e9e9e;
}
#cal #days td:not(:last-child) {
border-right:1px solid #fff;
}
#cal #cal-frame td.today {
background:#ededed;
color:#8c8c8c;
box-shadow:1px 1px 0px #fff inset;
-moz-box-shadow:1px 1px 0px #fff inset;
-webkit-box-shadow:1px 1px 0px #fff inset;
}
#cal #cal-frame td:not(.nil):hover {
color:#fff;
text-shadow: #6C1A07 0px -1px;
background:#CD310D;
background: -moz-linear-gradient(top, #b32b0c, #cd310d);
background: -webkit-gradient(linear, left top, left bottom, from(#b32b0c), to(#cd310d));
-moz-box-shadow:0px 0px 0px;
-webkit-box-shadow:0px 0px 0px;
}
#cal #cal-frame td span {
font-size:80%;
position:relative;
}
#cal #cal-frame td span:first-child {
bottom:5px;
}
#cal #cal-frame td span:last-child {
top:5px;
}
#cal #cal-frame table.curr {
float:left;
}
#cal #cal-frame table.temp {
position:absolute;
}
Screenshot :-
Hope this will work for you.
I am trying to replicate as pixel perfect as I can get and im having trouble trying to do the shadow on the right. Is this possible with css?
CSS:
*{margin:0px;padding:0px;}
html {
width:100%;
height:100%;
text-align: center;
}
.bold {
font-weight:700;
}
#ribbon {
padding: .34em 1em;
margin: 0;
margin-top: 5%;
position:relative;
color: #000;
text-align: center;
letter-spacing:0.1em;
padding-top:12px;
padding-bottom:12px;
display: inline-block;
background: #ffd82b;
z-index:100;
box-shadow: 0 7px 0px -2px #ebeced;
}
#ribbon:after {
content: "";
width:3.2em;
bottom:-.5em;
position:absolute;
display:block;
border: .9em solid #ffd82b;
box-shadow: 0 7px 0px -2px #ebeced;
z-index:-2;
}
#ribbon:after {
right: -4.3em;
border-left-width: .75em;
border-right-color:transparent;
}
#content:after {
content:"";
bottom:-.5em;
position:absolute;
display:block;
border-style:solid;
border-color: #fc9f42 transparent transparent transparent;
z-index:-1;
}
#content:before {
content:"";
top:-.5em;
transform: rotate(90deg);
position:absolute;
display:block;
border-style:solid;
border-color: #fc9f42 transparent transparent transparent;
z-index:-1;
}
#content:before {
left: 0;
border-width: .5em 0 0 .5em;
}
#content:after {
right: 0;
border-width: .5em .5em 0 0;
}
HTML:
<div id="ribbon">
<span id="content"><span class="bold">Special Offer:</span> Recieve bonus rewards points for signing up</span>
</div>
Or here's a jsfiddle:
http://jsfiddle.net/k0a6jhv6/
You can make this ribbon without using box-shadows, only with borders, z-index and pseudo elements :
DEMO
output :
.ribbon{
font-size:20px;
position:relative;
display:inline-block;
margin: 2em 1em;
text-align:center;
}
.text{
display:inline-block;
padding:0.5em 1em;
min-width:20em;
line-height:1.2em;
background: #FFD72A;
position:relative;
}
.ribbon:after,.ribbon:before,
.text:before,.text:after,
.bold:before{
content:'';
position:absolute;
border-style:solid;
}
.ribbon:before{
top:0.3em; left:0.2em;
width:100%; height:100%;
border:none;
background:#EBECED;
z-index:-2;
}
.text:before{
bottom:100%; left:0;
border-width: .5em .7em 0 0;
border-color: transparent #FC9544 transparent transparent;
}
.text:after{
top:100%; right:0;
border-width: .5em 2em 0 0;
border-color: #FC9544 transparent transparent transparent;
}
.ribbon:after, .bold:before{
top:0.5em;right:-2em;
border-width: 1.1em 1em 1.1em 3em;
border-color: #FECC30 transparent #FECC30 #FECC30;
z-index:-1;
}
.bold:before{
border-color: #EBECED transparent #EBECED #EBECED;
top:0.7em;
right:-2.3em;
}
<p class="ribbon">
<span class="text"><strong class="bold">Special Offer:</strong> Recieve bonus rewards points for signing up</span>
</p>
What if you add a new element to create missing shadow?
#abc {
display:inline-block;
border: .9em solid #ebeced;
border-right-color:transparent;
position:absolute;
right:-73px;
z-index:-3;
bottom:-12px;
}
http://jsfiddle.net/k0a6jhv6/9/
another solution, use span:after inside #content
#content span:after {
content:'';
display:block;
border: .9em solid #ebeced;
border-right-color:transparent;
position:absolute;
right:-73px;
z-index:-3;
bottom:-12px;
}
http://jsfiddle.net/k0a6jhv6/11/
Hello i have made a template and a whole role playing game with over 400 pages of coding now users have told me the page does not work in i.e . I have viewed my website in firefox and chrome and works fine. But when i view it in i.e it shows a messed up page.
I have tried using
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
But does not work / help i also have scroll bars ( when logged in ) And if your shuffle over to the left or right of the page by using left or right keys on the keyboard the slidey bar does not slide down.
So is there anyways to make my template work in i.e and stop users from pressing left and right e.g the template from moving left to right ?
Here is my css
html
{
background: url(../images/background.png);
background-color: transparent;
}
body {
width: 1000px;
margin: auto;
padding: 0;
text-align: center;
color: #000000;
font-family: verdana;
font-size: 0.7em;
}
.auction_box
{
display:inline-block ;
}
div.container
{
width:100%;
height:100%;
position:absolute;
margin:auto;
}
div.holder
{
width:990px;
background-color:#d7f7f7;
height:100%;
margin:auto;
margin-top:0px;
background-image:url('../images/swampertbackground.png');
background-repeat:no-repeat;
background-position:bottom center;
}
#container{
height: 100%;
width: 1000px;
background-color: #d7f7f7;
position: fixed;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
border-top-left-radius:10px;
border-top-right-radius:10px;
border-left: solid #25a5a6 2px;
border-right: solid #25a5a6 2px;
overflow-y: auto;
overflow-x: auto;
}
div.banner
{
height:125px;
width:700px;
display:block;
position:absolute;
margin-top:2px;
margin-left:140px;
background-color:#FFF;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
border-top-left-radius:7px;
border-top-right-radius:7px;
border: solid #25a5a6 1px;
background-image:url('../images/banner.png');
box-shadow: 3px 3px 3px #4b8384;
}
ul , li
{
margin:0px;
padding:0px;
list-style:none;
}
div.left_navigation
{
position:absolute;
margin-left:5px;
margin-top:150px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
width: 152px;
}
div.leftside2_navigation
{
position:absolute;
margin-left:5px;
margin-top:280px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
width: 152px;
}
div.left_navigation2
{
position:absolute;
margin-left:5px;
margin-top:330px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.clans
{
position:absolute;
margin-left:5px;
margin-top:410px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.left_navigation3
{
position:absolute;
margin-left:5px;
margin-top:525px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.left_navigation4
{
position:absolute;
margin-left:5px;
margin-top:620px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.left_navigation5
{
position:absolute;
margin-left:5px;
margin-top:680px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.left_navigation6
{
position:absolute;
margin-left:5px;
margin-top:750px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
li.header
{
width:150px;
height:14px;
background-color:#54c0c1;
border:1px #188c8d solid;
border-top-left-radius:7px;
border-top-right-radius:7px;
background-image:url('../images/header.png');
border-left:2px #188c8d solid;
color:#FFFFFF;
font-weight:900;
}
li.links
{
width:150px;
height:16px;
background-color:#c1f9fa;
border-bottom:1px #188c8d solid;
border-left:2px #188c8d solid;
border-right:1px #188c8d solid;
color:#074647;
}
li.links:hover
{
background-color:#FFFF00;
color:#296584;
font-weight:bold;
text-shadow: 1px 2px 2px #0096ff;
}
li.footer
{
width:150px;
height:9px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
background-image:url('../images/header.png');
border-bottom:1px #188c8d solid;
border-left:2px #188c8d solid;
border-right:1px #188c8d solid;
}
div.centerboxholder
{
position:absolute;
top:150px;
margin-left:165px;
width:661px;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
div.centerbox
{
position:absolute;
width:661px;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
li.chead
{
width:660px;
height:14px;
border-top-left-radius:7px;
border-top-right-radius:7px;
background-image:url('../images/header.png');
border-left:2px #188c8d solid;
border-right:1px #188c8d solid;
border:1px #188c8d solid;
color:#FFFFFF;
font-weight:900;
box-shadow: 0px 0px 3px #4b8384;
}
li.ccontent
{
width:659px;
background-color:#c1f9fa;
border-bottom:1px #188c8d solid;
border-left:2px #188c8d solid;
color:#000;
font-size:0.9em;
border-right:1px #188c8d solid;
box-shadow: 3px 3px 3px #4b8384;
}
li.cfoot
{
width:659px;
height:9px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
background-image:url('../images/header.png');
border-bottom:1px #188c8d solid;
border-left:2px #188c8d solid;
border-right:1px #188c8d solid;
box-shadow: 3px 3px 3px #4b8384;
}
div.right_navigation
{
position:absolute;
margin-left:834px;
top:150px;
box-shadow: 3px 3px 3px #4b8384;
border-top-left-radius:7px;
border-top-right-radius:7px;
border-bottom-left-radius:7px;
border-bottom-right-radius:7px;
}
table
{
padding:0px;
margin:0px;
border: 0px;
font-size:0.9em;
font-weight:bold;
color:#000;
}
td
{
border:1px #188c8d solid;
width:200px;
text-align:center;
}
#textfield
{
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
border-radius:5px;
}
#gender
{
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
border-radius:5px;
width:110px;
padding:0px;
}
#gendertop
{
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
}
#genderbottom
{
color: #000000;
font-family: verdana;
font-size:1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
}
#button
{
background-color:Transperent;
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
width:100px;
padding-top:0px;
margin:0px;
height:16px;
padding-bottom:5px;
}
#Avatar
{
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border:1px #188c8d solid;
border-radius:5px;
width:110px;
}
#changer
{
color: #000000;
font-family: verdana;
font-size: 1em;
font-weight: bold;
background-color:#e2fffc;
border-bottom:1px #188c8d solid;
}
li.topper
{
height:12px;
border:1px #188c8d solid;
border-top-left-radius:5px;
border-top-right-radius:5px;
background-image:url('../images/header.png');
}
li.bottomer
{
border:1px #188c8d solid;
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;
background-image:url('../images/header.png');
height:12px;
}
#button:hover
{
cursor:pointer;
}
a:link { color:#296584; text-decoration:none;display:block;}
a:visited { color:#296584; text-decoration:none;}
a:hover { color:#296584; text-decoration:none;text-shadow: 1px 2px 2px #0096ff;}
a:active {color:#296584; text-decoration:none; background-color:}
My website url is pokemontoxic.net so everyone cna view it in i.e and see what i mean. Thanks
You've got your doctypes wrong. At the top of your pages, change this:
<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
to this:
<!doctype html>
<html>
Or, at least swap their places.
1st:
Emulate7 will tell all IE browsers to pretend to act as if they're IE7. Just remove these lines:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
and instead, add the below code, which means your site supports IE7:
<meta http-equiv="X-UA-Compatible" content="IE=7"/>
2nd:
In your CSS, you have div.container and div.holder, the dot stands for a "class", but you have <div id="container"> and <div id="holder">. So either you change the CSS to div#container and div#holder OR change the attribute id to class, like this <div class="container"> and <div class="holder">
So I have this problem, which has never happened to me before.
I am trying to put a text field exactly next to an a button, which I already did and it looks great.
The problem is that it looks great on firefox, but on chrome the only issue is the button's height. I dont know why its not taking the specified height. Everything else on my site works great (height wise) its all the same specified hight on all cross-platforms
Here is the code:
HTML
<div> <!-- filter item start -->
<p>
<a href="#" id="add-friend-feed-link">
Add Friend
</a>
</p>
<form method="post" action="" name="searchFriendForm" id="add-friend-search">
<input type="text"/ name="searchFriendText">
<input type="button" class="small green button" id="add-friend-button"/>
</form>
<hr>
</div> <!-- filter item end -->
and CSS
/* Absolutes start */
#add-friend-search{
display: block;
position: absolute;
}
#add-friend-search input[type="text"]{
-moz-border-radius:4px 0px 0px 4px;
-moz-box-shadow:0 1px 0 #444444;
-webkit-border-radius:4px 0px 0px 4px;
-webkit-box-shadow:0 1px 0 #444444;
border-radius:4px 0px 0px 4px;
box-shadow:0 1px 0 #444444;
background:none repeat scroll 0 0 #D4D8DF;
border:1px solid black;
color:#444444;
font:13px Arial,sans-serif;
height:19px;
margin: 20px 4px 4px;
padding:5px 6px 4px;
width:250px;
text-align: center;
float: left;
display: inline-block;
}
#add-friend-search{
background:url("../images/small arrow.png") no-repeat scroll 88px 2px transparent;
display:block;
position:absolute;
width:332px;
}
#add-friend-search input[type="button"]{
background:url("../images/search icon.png");
background-position: center;
}
#add-friend-button{
border: 1px solid black;
border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
-webkit-border-radius: 0 4px 4px 0;
display: inline-block;
height: 21px !important;
margin-right: 33px;
margin-top: 20px;
position: absolute;
right: 0;
max-height: 31px;
}
/*Absolutes end */
this is what it looks like in Firefox
and this is what it looks like in chrome
this is the button xcss that contains small, green but I am not supposed to modify this CSS AT ALL
/*--------------------------------------------------------------------------------------------
Button Styles Reset - Gets rid of Browser Specific Issues
-------------------------------------------------------------------------------------------- */
input[type="button"], button {
border:0 none;
font:inherit;
}
*:focus{outline:0 none;}
input[type="submit"] {border:1px solid rgba(0, 0, 0, 0.25);}
input[type="button"], button {-moz-box-sizing: content-box;}
input[type="button"]::-moz-focus-inner, button::-moz-focus-inner { padding:0;border:0 none; }/*fixes mozilla button padding */
.clearfix:after {
clear: both;
content: '.';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}
/*--------------------------------------------------------------------------------------------
General Button Styles, Cascades Down To Every Button
-------------------------------------------------------------------------------------------- */
.button {
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.50);
-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.50);
box-shadow:0 1px 3px rgba(0, 0, 0, 0.50);
background:#222222 url(button-images/button-overlay.png) repeat-x;
border:1px solid rgba(0, 0, 0, 0.25);
color:#FFFFFF !important;
cursor:pointer;
display:inline-block;
font-size:13px;
font-weight:bold;
line-height:1;
overflow:visible;
padding:5px 15px 6px;
position:relative;
text-decoration:none;
text-shadow:0 -1px 1px rgba(0, 0, 0, 0.25);
width:auto;
text-align:center;
}
.button:hover {
background:#111111;
color:#FFFFFF;
}
.button:active {
background:#242424;
}
.green.button {
background-color:#91BD09;
}
.green.button:hover {
background-color:#749A02;
}
.green.button:active {
background-color:#a4d50b;
}
.blue.button {
background-color:#0E59AE;
}
.blue.button:hover {
background-color:#063468;
}
.blue.button:active {
background-color:#1169cc;
}
.purple.button {
background-color:#660099;
}
.purple.button:hover {
background-color:#330066;
}
.purple.button:active {
background-color:#7f02bd;
}
.breen.button {
background-color:#2DAEBF;
}
.breen.button:hover {
background-color:#007D9A;
}
.breen.button:active {
background-color:#36cbdf;
}
.red.button {
background-color:#CC0000;
}
.red.button:hover {
background-color:#990000;
}
.red.button:active {
background-color:#ea0202;
}
.magenta.button {
background-color:#A9014B;
}
.magenta.button:hover {
background-color:#630030;
}
.magenta.button:active {
background-color:#ce025c;
}
.orange.button {
background-color:#FF5C00;
}
.orange.button:hover {
background-color:#D45500;
}
.orange.button:active {
background-color:#fd762a;
}
.yellow.button {
background-color:#FFE115;
}
.yellow.button:hover {
background-color:#E4C913;
}
.yellow.button:active {
background-color:#fee539;
}
.white.button {
background-color:#FFFFFF;
border:1px solid #CCCCCC;
color:#666666 !important;
font-weight:normal;
text-shadow:0 1px 1px #FFFFFF;
}
.white.button:hover {
background-color:#EEEEEE;
}
.white.button:active {
background-color:#ffffff;
}
.gray.button {
-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.50);
background:#FFFFFF url(button-images/button-overlay-black.png) repeat-x;
border:1px solid #BBBBBB;
color:#555555 !important;
text-shadow:0 1px 1px rgba(255, 255, 255, 0.5);
}
.gray.button:hover {
background-color:#EEEEEE;
border-color:#999999;
color:#444444 !important;
}
.gray.button:active {
background-color:#ffffff;
}
/*--------------------------------------------------------------------------------------------
Small Buttons
-------------------------------------------------------------------------------------------- */
.small.button {
font-size:11px;
padding:5px 15px 6px;
background-image:url(button-images/small-button-overlay.png);
}
input[type="submit"].small.button, .small.button.input {
padding:3px 15px 4px;
}
input[type="button"].small.button, button.small.button {
padding:4px 15px;
}
/*--------------------------------------------------------------------------------------------
Tall Buttons
-------------------------------------------------------------------------------------------- */
.tall.button {
font-size:14px;
padding:8px 19px 9px;
background-image:url(button-images/tall-button-overlay.png);
}
.tall.gray.button {
background-color:#FFFFFF;
background-image: url(button-images/tall-black.png);
background-repeat:repeat-x;
}
.tall.gray.button:hover {
background-color:#EEEEEE!important;
border-color:#999999;
color:#444444 !important;
}
.tall.gray.button:active {
background-color:#FFFFFF!important;
}
.tall.button em {
font-size:11.5px;
font-style:normal;
display:block;
margin-top:5px;
}
/*--------------------------------------------------------------------------------------------
Round Buttons
-------------------------------------------------------------------------------------------- */
.round.button {
-moz-border-radius:15px;
-webkit-border-radius:15px;
border-radius:15px;
background-image:url(button-images/round-button-overlay.png);
border:1px solid rgba(0, 0, 0, 0.25);
font-size:13px;
padding:0;
}
.round.button span {
-moz-border-radius:14px;
-webkit-border-radius:14px;
border-radius:14px;
display:block;
line-height:1;
padding:4px 15px 6px;
}
.round.button.input {
padding:3px 13px 4px;
}
.small.round.button {
-moz-border-radius:12px;
-webkit-border-radius:12px;
border-radius:12px;
font-size:11px;
}
input[type="button"].round.small.button, button.round.small.button {
padding:0;
}
.small.round.button span {
-moz-border-radius:11px;
-webkit-border-radius:11px;
border-radius:11px;
padding:6px 15px 6px;
}
.large.round.button {
-moz-border-radius:18px;
-webkit-border-radius:18px;
border-radius:18px;
background-position:left bottom;
}
.large.round.button span {
-moz-border-radius:17px;
-webkit-border-radius:17px;
border-radius:17px;
font-size:14px;
padding:7px 20px 9px;
}
.large.tall.round.button small {
display:block;
margin-top:5px;
}
Chrome and Firefox seem to be in conflict with displaying the styles in your classes: small, green and input in conjuction with the style applied for the id add-friend-button.
There are a lot of styles being applied against that button. I would suggest you try to rebuild that form, adding a class at a time and check in each browser until you encounter the difference.
EDIT
The difference between the rendering of the submit button is due to
-moz-box-sizing: content-box;
located in your css class
input[type="button"], button {
-moz-box-sizing: content-box;
}
turn if off in firebug in firefox and you will see the button take on the same dimensions as in chrome.
There's a good article on this at quirksmode.org and you can find documentation on box-sizing on MDN. The solution is the same as what Nicholas suggests.
input[type=submit], input[type=button], button {
box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
Like with border-radius, I prefer to use a SASS mixin to handle the browser prefixes.