I have an issue with my dropdown menu. I have a table and at the end of each row i have a dropdown menu like that :
When i hover the menu on every browser i got this :
Except on IE11 :
Here is my CSS :
#dropdown_classe {
margin: 10px 0 20px 0;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
#dropdown_classe .wrapper {
display: inline-block;
width: 180px;
margin: 0 10px 0 0;
height: 20px;
position: relative;
}
#dropdown_classe .parent {
height: 100%;
width: 100%;
display: block;
cursor: pointer;
line-height: 30px;
height: 30px;
border-radius: 5px;
background: #F9F9F9;
border: 1px solid #AAA;
border-bottom: 1px solid #777;
color: #282D31;
font-weight: bold;
font-size: 13px;
z-index: 2;
position: relative;
-webkit-transition: border-radius .1s linear, background .1s linear, z-index 0s linear;
-webkit-transition-delay: .8s;
text-align: center;
}
#dropdown_classe .parent:hover,
#dropdown_classe .content:hover ~ .parent {
background: #fff;
-webkit-transition-delay: 0s, 0s, 0s;
}
#dropdown_classe .content:hover ~ .parent {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
z-index: 0;
}
#dropdown_classe .content {
position: absolute;
top: 0;
display: block;
z-index: 1;
height: 0;
width: 180px;
padding-top: 30px;
-webkit-transition: height .3s ease;
-webkit-transition-delay: .2s;
border: 1px solid #777;
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
#dropdown_classe .wrapper:hover .content {
height: 253px;
z-index: 3;
-webkit-transition-delay: 0s;
}
#dropdown_classe .content:hover {
height: 253px;
z-index: 3;
-webkit-transition-delay: 0s;
}
#dropdown_classe .content ul {
background: #fff;
margin: 0;
padding: 0;
overflow: hidden;
height: 100%;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
#dropdown_classe .content ul a {
text-decoration: none;
}
#dropdown_classe .content li:hover {
background: #eee;
color: #333;
}
#dropdown_classe .content li {
list-style: none;
text-align: left;
color: #888;
font-size: 13px;
line-height: 30px;
height: 30px;
padding-left: 10px;
border-top: 1px solid #ccc;
}
#dropdown_classe .content li:last-of-type {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
If you have any advice please let me know
Ctbs1
I fixed this issue with this :
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Related
I am making a portal for some students but every time they resize the browser window, the CSS classes move around.
I've been stuck on this for a few days now and I think I'm spending way too much time just trying to figure this part out.
I put the code in the post and I attached the background image. Is there a certain CSS rule that will make it where the CSS classes won't move when the browser moves?
Thanks!
Here's the CSS & HTML code:
.google-container {
overflow: hidden;
bottom: 2070px;
left: 350px;
padding-top: 56.25%;
position: relative;
}
.java-container {
overflow: hidden;
padding-top: 56.25%;
position: relative;
}
.java-container iframe {
border: 0;
height: 400%;
right: 400px;
position: absolute;
top: 200px;
width: 100%;
}
.iframe-container {
overflow: hidden;
padding-top: 56.25%;
position: relative;
}
.iframe-container iframe {
border: 0;
height: 100%;
left: 1538px;
position: absolute;
top: 180px;
width: 100%;
}
.sutori {
position: absolute;
bottom: 1878px;
left: 422px;
background-color: #33afff;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
padding: 20px;
width: 240px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sutori:hover,
.sutori:focus {
background-color: #d3d3d3;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
bottom: 1825px;
left: 260px;
background-color: #d3d3d3;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {
background-color: #ddd;
}
.show {
display: block;
}
.drivebutton {
position: absolute;
bottom: 510px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.drivebutton:hover,
.drivebutton:focus {
background-color: #d3d3d3;
}
.drivebutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.drivebutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.drivebutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.drivebutton:hover,
.drivebutton:focus {
background-color: #d3d3d3;
}
.drivebutton a:hover {
background-color: #ddd;
}
.classroombutton {
position: absolute;
bottom: 385px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.classroombutton:hover,
.classroombutton:focus {
background-color: #d3d3d3;
}
.classroombutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.classroombutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.classroombutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.classroombutton:hover,
.classroombutton:focus {
background-color: #d3d3d3;
}
.classroombutton a:hover {
background-color: #ddd;
}
.youtubebutton {
position: absolute;
bottom: 295px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.youtubebutton:hover,
.youtubebutton:focus {
background-color: #d3d3d3;
}
.youtubebutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.youtubebutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.youtubebutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.youtubebutton:hover,
.youtubebutton:focus {
background-color: #d3d3d3;
}
.youtubebutton a:hover {
background-color: #ddd;
}
.conbutton {
position: absolute;
bottom: 512px;
left: 816px;
background-color: #daa520;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.conbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.conbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.conbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.conbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.conbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.conbutton a:hover {
background-color: #ddd;
}
.mailbutton {
position: absolute;
bottom: 600px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.mailbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.mailbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.mailbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.mailbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.mailbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.mailbutton a:hover {
background-color: #ddd;
}
.button {
position: absolute;
bottom: 450px;
left: 570px;
background-color: #33afff;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.button:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.button:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.button:hover,
.button:focus {
background-color: #000000;
}
.buttonflip {
position: absolute;
bottom: 510px;
left: 430px;
background-color: #18d71f;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.buttonflip:hover,
.buttonflip:focus {
background-color: #d3d3d3;
}
.buttonflip:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.buttonflip:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.buttonflip-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.buttonflip:hover,
.buttonflip:focus {
background-color: #d3d3d3;
}
.buttonflip a:hover {
background-color: #ddd;
}
.sketchfabbutton {
position: absolute;
bottom: 295px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sketchfabbutton:hover,
.sketchfabbutton:focus {
background-color: #d3d3d3;
}
.sketchfabbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.sketchfabbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.sketchfabbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.sketchfabbutton:hover,
.sketchfabbutton:focus {
background-color: #d3d3d3;
}
.sketchfabbutton a:hover {
background-color: #ddd;
}
.sketchbutton {
position: absolute;
bottom: 385px;
left: 430px;
background-color: #107014;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sketchbutton:hover,
.sketchbutton:focus {
background-color: #d3d3d3;
}
.sketchbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.sketchbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.sketchbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.sketchbutton:hover,
.sketchbutton:focus {
background-color: #d3d3d3;
}
.sketchbutton a:hover {
background-color: #ddd;
}
.eastbutton {
position: absolute;
bottom: 629px;
left: 816px;
background-color: #0091b2;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.eastbutton:hover,
.eastbutton:focus {
background-color: #d3d3d3;
}
.eastbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.eastbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.eastbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.eastbutton:hover,
.eastbutton:focus {
background-color: #d3d3d3;
}
.eastbutton a:hover {
background-color: #ddd;
}
body {
background-image: url("backtest2.png");
background-repeat: no-repeat;
background-position: right 400% bottom 101%;
background-size: 1920px 1000px;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>EAST Portal!</title>
<div class="iframe-container">
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FEAST-at-Gentry-Public-Schools-405756842946474%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId"
width="340" height="500" style="border:none;overflow:hidden;" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
</div>
<body scroll="no" style="overflow: hidden">
<div class="google-container" <center>
<form method="GET" action="https://www.google.com/search">
<a href="https://www.google.com/search?safe=vss">
<img src="https://www.edigitalagency.com.au/wp-content/uploads/google-logo-png-transparent-background-large-new-800x270.png" border="0" alt="Google" width="115" height="39" align="absmiddle"></a><br>
<input type="text" name="q" size="15" maxlength="255" value="" style="width:220px;height:40px;font-size:12px;border-style:solid; border-width:1px;">
<input type="submit" name="sa" value="Search" style="width:100px;height:40px;font-size:18px; padding-top:-20;"><input type="hidden" name="safe" value="strict">
</td>
</tr>
</tbody>
</table>
</form>
</center>
</div>
<style>
p {
position: fixed;
bottom: 750px;
left: 1200px;
font-size: 34px;
font-family: "Arial";
margin-top: 5px;
}
</style>
</head>
<body>
<div class="dropdown">
<button onclick="myFunction()" class="sutori">Sutori</button>
<div id="myDropdown" class="dropdown-content">
Sutori
EAST Sutori
Photography Club
</div>
</div>
</head>
<body>
Flipgrid</button>
Gmail</button>
Google Drive</button>
Google Classroom</button>
EAST</button>
Digital Nature Museum</button>
Conference Sign-up Sheet</button>
YouTube</button>
YouTube</button>
</body>
</html>
I wrote a little html page that contains some buttons. What I want to do is to have them look like this :
I'm not good at all at css, I tried some combination but what I get is to have them "below the blue line" like this :
Here is my html code :
<div class="module form-module">
<div class="flex-container">
<article class="article">
<table>
<tr>
<td>
<button>Configurations</button>
</td>
<td>
<button>Create User </button>
</td>
<td>
<button>Update User</button>
</td>
<td>
<button>Create Group</button>
</td>
<td>
<button>Update Group</button>
</td>
</tr>
</table>
</article>
</div>
</div>
You can find my css code in that plunker : https://plnkr.co/edit/sCcBBFfWRiCwGz8hs8oR?p=catalogue
Can you please help me to fix this little problem in html ?
CSS changes:
.form-module {
border-bottom: 5px solid #33b5e5;
position: relative;
background: #ffffff;
width: 100%;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.flex-container > * {
padding: 15px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
table {
border-spacing:0px;
}
td {
padding:0px;
}
Changes expalined:
The blue line is a border, and was set on the button's parent container. It was set to top when you wanted it to be on the bottom, so that's first change.
Then you had padding, which was separating the buttons from the edges of the container, that's second change, set it to 0px.
Finally, both the table and each button had a 1px border which would separate it from the edges of the container, third change was setting those borders to 0px.
Small suggestion:
In case you're not aware: it's really helpful to use browser inspector to better understand what's going on with CSS. Also, if you don't wish to make everything from scratch, I'd recommend you have a look at Bootstrap, it's quite easy and might save you a bunch of time.
Good luck.
In case it's useful, here's the complete CSS:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
table {
border-spacing:0px;
}
td {
padding:0px;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}
.pen-title span .fa {
color: #33b5e5;
}
.pen-title span a {
color: #33b5e5;
font-weight: 600;
text-decoration: none;
}
/* Form Module */
.form-module {
position: relative;
background: #ffffff;
width: 100%;
border-bottom: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #33b5e5;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module table {
width: 100%
}
.form-module input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module button:hover {
background: #178ab4;
}
.form-module select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag button {
background: white;
color: #178ab4;
}
.flag button:hover {
background: white;
border: 20px;
border-color: #178ab4;
}
.flag {
cursor: pointer;
background: white;
width: 100%;
border: 0;
padding: 10px 15px;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a {
cursor: pointer;
background: white;
width: 100%;
border: 0;
color: #33b5e5;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a :hover {
background: white;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}
.flex-container {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.flex-container > * {
padding: 0px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
.article {
text-align: left;
}
.detail button {
width: 120px
}
.detail table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 100%
}
.search table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 70%
}
.search button {
width: 120px
}
.search input {
outline: none;
width: 90%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.search select {
cursor: pointer;
width: 90%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.resultSearch table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 80%
}
.dropbtn {
outline: none;
border:1;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
}
#myInput {
border-box: box-sizing;
background-image: url('searchicon.png');
background-position: 14px 12px;
background-repeat: no-repeat;
font-size: 16px;
outline: none;
width: 100%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f6f6f6;
min-width: 230px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd}
.show {display:block;}
#searchbox
{
width: 35px;
}
#media all and (min-width: 768px) {
.nav {text-align:left;-webkit-flex: 1 auto;flex:1 auto;-webkit-order:1;order:1;}
.article {-webkit-flex:5 0px;flex:5 0px;-webkit-order:2;order:2;}
footer {-webkit-order:3;order:3;}
}
.newUser button {
width: 120px
}
.newUser table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%
}
.return table{
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%;
}
.returnCheckBox input {
align: left;
width:0%;
}
.invoiceListTable table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%
}
.sessionInfo table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 100%;
align: right;
}
.sessionInfo {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.sessionInfo > * {
padding: 15px;
-webkit-flex: 1 100%;
flex: 1 100%;
align: right;
}
.sessionInfo {
position: relative;
background: #ffffff;
width: 20%;
border-top: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.sessionInfo .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.sessionInfo .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.sessionInfo .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
align:right;
}
UPDATE:
You mentioned the buttons should be outside and above the form-module, so the html needs to be changed and not just the css. We removed the flex-container div which was nested inside form-module div and placed it after this container is closed. Since the buttons were getting their layout properties from .form-module's style, it was necessary to create a new class "buttons". Basically now form-module and buttons are in different containers and with separated style properties.
To understand how container blocks work:
http://www.w3schools.com/html/html_blocks.asp
html:
<div class="flex-container buttons">
<article class="article">
<table>
<tr>
<td>
<button>Configurations</button>
</td>
<td>
<button>Create User </button>
</td>
<td>
<button>Update User</button>
</td>
<td>
<button>Create Group</button>
</td>
<td>
<button>Update Group</button>
</td>
</tr>
</table>
</article>
</div>
<div class="module form-module">
</div>
changed css:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.buttons table {
width: 100%;
border-spacing:0px;
}
.buttons td {
padding:0px;
}
.buttons input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.buttons button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons button:hover {
background: #178ab4;
}
.buttons select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
complete css:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.buttons table {
width: 100%;
border-spacing:0px;
}
.buttons td {
padding:0px;
}
.buttons input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.buttons button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons button:hover {
background: #178ab4;
}
.buttons select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}
.pen-title span .fa {
color: #33b5e5;
}
.pen-title span a {
color: #33b5e5;
font-weight: 600;
text-decoration: none;
}
/* Form Module */
.form-module {
position: relative;
background: #ffffff;
width: 100%;
border-top: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #33b5e5;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module table {
width: 100%
}
.form-module input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module button:hover {
background: #178ab4;
}
.form-module select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag button {
background: white;
color: #178ab4;
}
.flag button:hover {
background: white;
border: 20px;
border-color: #178ab4;
}
.flag {
cursor: pointer;
background: white;
width: 100%;
border: 0;
padding: 10px 15px;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a {
cursor: pointer;
background: white;
width: 100%;
border: 0;
color: #33b5e5;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a :hover {
background: white;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}
.flex-container {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.flex-container > * {
padding: 0px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
.dropbtn {
outline: none;
border:1;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f6f6f6;
min-width: 230px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd}
.show {display:block;}
ul{
list-style-type:none;
width:500px;
}
li{
width:33%;
text-align:center;
float:left;
border-bottom:2px solid #33b5e5;
}
Maybe instead of a 'table' use a 'list' html element like ul or li.
plunker
New HTML:
<div class="module form-module">
<div class="flex-container">
<article class="article">
<ul>
<li>
<button>Configurations</button>
</li>
<li>
<button>Create User </button>
</li>
<li>
<button>Update User</button>
</li>
</ul>
</article>
</div>
</div>
and add the following CSS:
ul{
list-style-type:none;
width:500px;
}
li{
width:33%;
text-align:center;
float:left;
border-bottom:2px solid #33b5e5;
}
I'm making dropdown menu with HTML/CSS/JS. Entering five tags and adding "margin-top: 20px" it should make 20px spaces from top, but it makes bigger and smaller spaces - 24px from top, 28px from top, 28px from top...
I can't find the problem in my code. I was deleting margins, paddings on other classes. Any changes were unsuccessful.
HTML:
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn"><div class="cog"></div></button>
<div id="myDropdown" class="dropdown-content">
<div class="dop"></div>
Text
Text
Text
Text
Text
</div>
</div>
<script src="js/js-1_dropdown.js"></script>
CSS:
.dropbtn {
height: 34px;
width: 34px;
background: #f0f0f0;
border-radius: 3px;
border: none;
cursor: pointer;
transition: 0.3s ease;
-webkit-transition: 0.3s ease;
-moz-transition: 0.3s ease;
-o-transition: 0.3s ease;
}
.dropbtn:hover, .dropbtn:focus {
background: #ebebeb;
}
.dropdown {
position: relative;
display: inline-block;
margin-top: 100px;
margin-left: 100px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #ffffff;
width: 140px;
border-radius: 3px;
left: -53px;
top: 48px;
}
.dropdown-content a {
color: #b7b7b7;
text-decoration: none;
display: block;
font-family: OpenSans-Regular;
font-size: 12px;
text-align: center;
padding-top: 20px;
position: relative;
margin: 0;
}
.dropdown-content a:hover {
color: #adadad;
}
.show {display:block;}
.cog {
height: 16px;
width: 16px;
position: absolute;
top: 9px;
left: 9px;
background: url(img/i-3_settings.png);
}
.dop {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 4px solid #ffffff;
position: absolute;
top: -4px;
left: 65px;
}
* {
outline: none;
}
Live - https://jsfiddle.net/qc8aempj/
Ričards.
I'm doing a search box slide. What I need is that when you click on the magnifying glass, move the slide the "Castilian", text and that it is not fixed text and sarch see box below. It's possible? this is the best I could do ...
My code
try this css. This worked.
#wrap {
margin: 39px 60px;
display: inline-block;
position: relative;
/*float: right;*/
padding: 0;
position: relative;
}
input[type="text"] {
height: 60px;
font-size: 55px;
display: inline-block;
font-family: "Lato";
font-weight: 100;
border: none;
outline: none;
color: #555;
padding: 3px;
padding-right: 60px;
width: 0px;
position: relative;
top: 0;
right: 0;
background: none;
z-index: 3;
transition: width .4s cubic-bezier(0.000, 0.795, 0.000, 1.000);
cursor: pointer;
}
input[type="text"]:focus:hover {
border-bottom: 1px solid #BBB;
}
input[type="text"]:focus form {
width: 700px;
}
input[type="text"]:focus {
width: 700px;
z-index: 1;
border-bottom: 1px solid #BBB;
cursor: text;
}
input[type="submit"] {
height: 67px;
width: 63px;
display: inline-block;
color:red;
/*float: right;*/
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADNQTFRFU1NT9fX1lJSUXl5e1dXVfn5+c3Nz6urqv7+/tLS0iYmJqampn5+fysrK39/faWlp////Vi4ZywAAABF0Uk5T/////////////////////wAlrZliAAABLklEQVR42rSWWRbDIAhFHeOUtN3/ags1zaA4cHrKZ8JFRHwoXkwTvwGP1Qo0bYObAPwiLmbNAHBWFBZlD9j0JxflDViIObNHG/Do8PRHTJk0TezAhv7qloK0JJEBh+F8+U/hopIELOWfiZUCDOZD1RADOQKA75oq4cvVkcT+OdHnqqpQCITWAjnWVgGQUWz12lJuGwGoaWgBKzRVBcCypgUkOAoWgBX/L0CmxN40u6xwcIJ1cOzWYDffp3axsQOyvdkXiH9FKRFwPRHYZUaXMgPLeiW7QhbDRciyLXJaKheCuLbiVoqx1DVRyH26yb0hsuoOFEPsoz+BVE0MRlZNjGZcRQyHYkmMp2hBTIzdkzCTc/pLqOnBrk7/yZdAOq/q5NPBH1f7x7fGP4C3AAMAQrhzX9zhcGsAAAAASUVORK5CYII=) center center no-repeat;
text-indent: -10000px;
border: none;
position: absolute;
top: 0;
right: 0;
z-index: 2;
cursor: pointer;
opacity: 0.4;
cursor: pointer;
transition: opacity .4s ease;
}
input[type="submit"]:hover {
opacity: 0.8;
}
I've having problems rending off screen elements properly. I believe the problem has to do with overflow properties. If I view the browser at full screen(1080p) its fine, but when I resize the browser to a smaller resolution, and then SCROLL down, the styles disappear for off screen elements.
EDIT [ Removed links to prevent broken links in the future ]
/* DEFAULT */
* {
margin: 0px;
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
}
#font-face {
font-family: leela;
src: url('leelawad_0.ttf');
}
html, body {
height: 100%;
background-color: rgb(255,255,255);
}
h1 {
color: rgb(183,183,183);
font-family: leela;
font-size: 16px;
font-weight: normal;
text-transform: uppercase;
}
a {
color: rgb(102,102,102);
text-decoration: none;
}
/* ID */
#container {
height: 100%;
overflow-x: hidden;
width: 100%;
}
#header {
border: 1px solid rgb(153,153,153);
border-top: 0px;
background-color: rgb(255,255,255);
padding: 8px;
position: fixed;
width: 100%;
z-index: 3;
}
#quickSearch {
border: 1px solid rgb(153,153,153);
background-color: rgb(250,250,250);
height: 30px;
margin: 8px 8px 8px 8px;
}
#quickSearch input {
background-color: rgb(250,250,250);
border: 0px;
height: 28px;
margin-left: 10px;
margin-top: 0px;
float: left;
}
#naviContainer {
float: left;
width: 200px;
border-right: 1px solid rgb(153,153,153);
background-color: rgb(225,225,225);
height: 100%;
}
#navigation {
background-color: rgb(225,225,225);
float: left;
width: 200px;
margin-top: 31px;
position: relative;
z-index: 2;
height: 100%;
}
#navigation ul {
margin: 0px;
padding: 0px;
width: 200px;
}
#navigation li {
display: block;
list-style-type: none;
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
-o-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
}
#navigation li:hover {
background-color: rgb(173,173,173);
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
-o-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
}
#navigation h1 {
border-bottom: 1px dotted rgb(153,153,153);
background-color: rgb(127,127,127);
padding: 8px;
}
#navigation h1.fix {
border-top: 1px dotted rgb(153,153,153);
}
#navigation ul li {
border-bottom : 1px dotted rgb(153,153,153);
}
#navigation li a {
display: block;
padding: 8px;
}
#contentContainer {
margin-left: 201px;
margin-top: 31px;
position: relative;
}
#breadcrumbs {
background-color: rgb(239,239,239);
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: rgb(153,153,153);
padding: 8px;
position: inherit;
}
#breadcrumbs ul {
display: inline;
margin-left: 0px;
padding: 0px;
}
#breadcrumbs li {
display: inline;
}
#content {
padding: 8px;
position: inherit;
}
/* CLASSES */
.divider {
border-left: solid 1px rgb(102,102,102);
margin: 0px 7px 0px 5px;;
}
Any input would be greatly appreciated!
Try adding using position:fixed (I made it yellow so it would stand out):
#navigation {
background-color: yellow;
border-right: 1px solid #999999;
border-top: 0 none;
float: left;
height: 100%;
margin-top: 31px;
position: fixed;
width: 200px;
z-index: 2;
}
[Edit] 2nd attempt, remove height.
#navigation {
background-color: #E1E1E1;
float: left;
//height: 100%;
margin-top: 31px;
position: relative;
width: 200px;
z-index: 2;
}
that was nothing more then height:100% issue
Remove height:100% from #naviContainer will fix this.
#navigation {
background-color: #E1E1E1;
float: left;
min-height: 100%;
margin-top: 31px;
position: relative;
width: 200px;
z-index: 2;
}
#naviContainer {
background-color: #E1E1E1;
border-right: 1px solid #999999;
float: left;
min-height: 100%; /* the fix */
width: 200px;
}