I have made this drop down from the following website:
Inspirational Pixels
Here is my HTML code:
<td class="dess rec">
<a href="#" id="l_desserts" >desserts</a>
<ul class="submenu">
<li>Cake</li>
<li>Ice Cream</li>
<li>Shahi Kheer</li>
</ul>
</td>
It is a part of a table
CSS:
.submenu {
position:absolute;
overflow:hidden;
opacity:0;
background-color:#444;
width:100px;
top:37px;
left:-3px;
border-top:2px solid #fff;
}
.submenu>li {
list-style:none;
margin-left:-40px;
margin-top:3px;
}
.submenu>li>a {
display:block;
text-decoration:none;
color:#fff;
border:2px solid #444;
border-radius:5px;
padding:4px;
text-align:center;
font-family:Lucida Sans Unicode;
}
.submenu>li>a:hover {
border:2px solid white;
}
#l_desserts:hover .submenu {
z-index:1;
opacity: 1;
}
What my problem is that this drop down list is not working here in this case but earlier I made a drop down list using this method. You can see this here (the following link is of a blogger):
Indian Tadka
The same method is applied in here. I dont know Why it is not working>
body{
margin:0px;
}
#header{
height: 90px;
background-color: #444;
margin:0px;
color: #fff;
}
#logo{
width:70px;
height:90px;
background-image: url('../images/logo.jpg');
background-size: 70px 90px;
position:absolute;
z-index:2;
color:#fff;
text-align: center;
font-family: arial;
font-weight: bold;
text-shadow: 2px 1px #000;
cursor: pointer;
}
#complete_name{
position:absolute;
top:0px;
color:#fff;
font-family:arial;
font-weight:bold;
font-size:20px;
z-index:1;
background-color:#444;
}
#nav{
position:absolute;
left:75px;
color:#fff;
z-index:0;
top:37px;
}
#l_desserts, #l_rice{
color:#fff;
text-decoration:none;
padding-left:24px;
font-family: Lucida Sans Unicode;
display:block;
background-image: url('../images/coffie_paper_texture.jpg');
background-position:center;
background-size: 100px 20px;
}
.rec{
width:100px;
}
.otl{
width:100px;
background-color:#717171;
}
.submenu{
position:absolute;
overflow:hidden;
opacity:0;
background-color:#444;
width:100px;
top:37px;
left:-3px;
border-top:2px solid #fff;
}
.submenu>li{
list-style:none;
margin-left:-40px;
margin-top:3px;
}
.submenu>li>a{
display:block;
text-decoration:none;
color:#fff;
border:2px solid #444;
border-radius:5px;
padding:4px;
text-align:center;
font-family:Lucida Sans Unicode;
}
.submenu>li>a:hover{
border:2px solid white;
}
#l_desserts:hover .submenu{
z-index:1;
opacity: 1;
}
<header id="header">
<div id="logo" onmouseover="show_name()" onmouseout="hide_name()"> </div>
<font id="complete_name"></font>
<table id="nav">
<tr id="Oth_links">
<td class="photoGall Otl"><a id="pg" href="#">Photo Gallery</a></td>
</tr>
<tr id="toRecipes">
<td class="dess rec">
<a href="#" id="l_desserts" >desserts</a>
<ul class="submenu">
<li>Cake</li>
<li>Ice Cream</li>
<li>Shahi Kheer</li>
</ul>
</td>
<td class="rice rec">
Rice
</td>
</tr>
</table>
</header>
I got the answer
i just have to change my line:
#l_desserts:hover .submenu{ ...
to this:
#l_desserts:hover+.submenu
but it still dont know how the preceding method did worked in my blogger
body{
margin:0px;
}
#header{
height: 90px;
background-color: #444;
margin:0px;
color: #fff;
}
#logo{
width:70px;
height:90px;
background-image: url('../images/logo.jpg');
background-size: 70px 90px;
position:absolute;
z-index:2;
color:#fff;
text-align: center;
font-family: arial;
font-weight: bold;
text-shadow: 2px 1px #000;
cursor: pointer;
}
#complete_name{
position:absolute;
top:0px;
color:#fff;
font-family:arial;
font-weight:bold;
font-size:20px;
z-index:1;
background-color:#444;
}
#nav{
position:absolute;
left:75px;
color:#fff;
z-index:0;
top:37px;
}
#l_desserts, #l_rice{
color:#fff;
text-decoration:none;
padding-left:24px;
font-family: Lucida Sans Unicode;
display:block;
background-image: url('../images/coffie_paper_texture.jpg');
background-position:center;
background-size: 100px 20px;
}
.rec{
width:100px;
}
.otl{
width:100px;
background-color:#717171;
}
.submenu{
position:absolute;
overflow:hidden;
opacity:0;
background-color:#444;
width:100px;
top:37px;
left:-3px;
border-top:2px solid #fff;
}
.submenu>li{
list-style:none;
margin-left:-40px;
margin-top:3px;
}
.submenu>li>a{
display:block;
text-decoration:none;
color:#fff;
border:2px solid #444;
border-radius:5px;
padding:4px;
text-align:center;
font-family:Lucida Sans Unicode;
}
.submenu>li>a:hover{
border:2px solid white;
}
#l_desserts:hover+.submenu{
opacity:1;
z-index:3;
}
<html>
<head>
<title>Indian Tadka- Home</title>
<link rel="stylesheet" href="styles/main.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/scr_home.js"></script>
<script type="text/javascript" src="scripts/JIO.js"></script>
</head>
<body>
<header id="header">
<div id="logo" onmouseover="show_name()" onmouseout="hide_name()"> </div>
<font id="complete_name"></font>
<table id="nav">
<tr id="Oth_links">
<td class="photoGall Otl"><a id="pg" href="#">Photo Gallery</a></td>
</tr>
<tr id="toRecipes">
<td class="dess rec">
<a href="#" id="l_desserts" onmouseover="showDess();" >desserts</a>
<ul class="submenu">
<li>Cake</li>
<li>Ice Cream</li>
<li>Shahi Kheer</li>
</ul>
</td>
<td class="rice rec">
Rice
</td>
</tr>
</table>
</header>
</body>
</html>
Related
body{
background: #d4d4d4;
width:100%;
font-family: Helvetica, Arial, sans-serif;
margin:0px;
padding:0px;
}
.container{
background:#ffffff;
margin: 0px auto;
width: 50%;
}
.header-1{
background-color:#000000;
padding:0px 20px 0px 20px;
height:40px;
}
.header-1 p{
float:right;
font-size: 12px;
color:white;
}
span{
font-size:11px;
position:relative;
right:-145px;
color:white;
}
.logo{
float: left;
width:149px;
height:26px;
padding-top:10px;
}
.delivery{
float:right;
color: black;
}
.loop{
clear:both;
text-align: center;
}
.brand{
list-style-type: none;
}
.brand li{
display:inline-block;
background: #000000;
color:white;
margin-left:-40px;
margin-right:30px;
font-weight:bold;
width:86px;
height:28px;
vertical-align: middle;
}
.header-banner{
width:600px;
height:40px;
}
.header-banner img{
width:570px;
}
.official h1{
margin-left: 30px;
}
.official p{
margin-left:30px;
font-size: 13px;
}
.order-info{
list-style-type:none;
}
.order-info li{
display:inline-block;
margin-right:30px;
}
.product-image{
float:left;
}
.product-image img{
margin-left:30px;
}
.product-container{
float:right;
}
.price-list{
list-style-type: none;
}
.price-list li{
display:inline-block;
margin-left:30px;
margin-right:3px;
}
.price-table{
float:right;
}
.price-total{
column-count: 2;
list-style-type: none;
column-gap:2px;
}
.line-4{
width:100%;
size:20;
color:black;
}
<div class="">
<ul class="order-info">
<li><h3>Order Info</h3><hr><p>Order#: 445501<br>
Order Date: 26 de junio de<br> 2017</p></li>
<li><h3>Bill To</h3><hr><p>Sergio Piana<br>
VIA CRESPI BENIGNO<br>
11111111111</p></li>
<li><h3>Ship To</h3><hr><p>Sergio Piana<br>
VIA CRESPI BENIGNO<br>
11111111111</p></li>
</ul>
</div>
<hr size="3" color="black">
<div>
<div class="product-image">
<img src="http://s7d3.scene7.com/is/image/LuxotticaRetail/679420297255_shad_qt?wid=150&hei=65&fmt=jpeg&qlt=65&op_usm=2.0,0.2,0,0&op_sharpen=0">
</div>
<div class="price-container">
<ul class="price-list">
<li><h4>Model</h4><hr><p>Model:<br>
SKU: 679420297255<br></p></li>
<li><h4>Quantity</h4><hr><p>1</p></li>
<li><h4>Quantity</h4><hr><p>191.60</p></li>
<li>Status:Cancelled</li>
</ul>
<hr>
</div>
<div class="price-table">
<ul class="price-total">
<li>Sub-total (includes VAT)</li>
<li>Packaging & Postage</li>
<li>Order Total</li>
<li>�191.60</li>
<li>�0.00</li>
<li>�191.60</li>
</ul>
</div>
</div>
<hr class="line-4">
I'm new to html and css. I have been trying to make an email template using html and css but it's not in the right away.The <hr> alignments are not proper.I have attached a screen shot as to how the look should be.
Should I have to use relative and absolute positioning or normal floats/ul and li. It would be helpful if someone gives me an insight on it. Thank You.
I have fixed the <hr> alignment. I have also made few more changes.
.price-list li{
display:inline-block;
margin-left:30px;
margin-right:3px;
vertical-align: text-top; //This is used to align all li from top
}
Here is the plunker: https://plnkr.co/edit/04dN4PDB3LjLHBjAOGbZ?p=preview
/* Styles go here */
body{
width:100%;
font-family: Helvetica, Arial, sans-serif;
margin:0px;
padding:0px;
}
.container{
background:#ffffff;
margin: 0px auto;
width: 50%;
}
.header-1{
background-color:#000000;
padding:0px 20px 0px 20px;
height:40px;
}
.header-1 p{
float:right;
font-size: 12px;
color:white;
}
span{
font-size:11px;
position:relative;
right:-145px;
color:white;
}
.logo{
float: left;
width:149px;
height:26px;
padding-top:10px;
}
.delivery{
float:right;
color: black;
}
.loop{
clear:both;
text-align: center;
}
.brand{
list-style-type: none;
}
.brand li{
display:inline-block;
background: #000000;
color:white;
margin-left:-40px;
margin-right:30px;
font-weight:bold;
width:86px;
height:28px;
vertical-align: middle;
}
.header-banner{
width:600px;
height:40px;
}
.header-banner img{
width:570px;
}
.official h1{
margin-left: 30px;
}
.official p{
margin-left:30px;
font-size: 13px;
}
.order-info{
list-style-type:none;
}
.order-info li{
display:inline-block;
margin-right:30px;
}
.product-image, .price-container{
float:left;
}
.price-container {
width: calc(100% - 200px);
}
.product-image {
width: 180px;
}
.product-image img{
margin-left:30px;
}
.product-container{
float:right;
}
.price-list{
list-style-type: none;
padding: 0;
margin: 0;
}
.price-list h4 {
margin-top: 0;
}
.price-list li{
display:inline-block;
margin-left:30px;
margin-right:3px;
vertical-align: text-top;
}
.price-table{
float:right;
}
.price-total{
column-count: 2;
list-style-type: none;
column-gap:2px;
}
.line-4{
width:100%;
size:20;
color:black;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<div class="">
<ul class="order-info">
<li><h3>Order Info</h3><hr><p>Order#: 445501<br>
Order Date: 26 de junio de<br> 2017</p></li>
<li><h3>Bill To</h3><hr><p>Sergio Piana<br>
VIA CRESPI BENIGNO<br>
11111111111</p></li>
<li><h3>Ship To</h3><hr><p>Sergio Piana<br>
VIA CRESPI BENIGNO<br>
11111111111</p></li>
</ul>
</div>
<hr size="3" color="black">
<div>
<div class="product-image">
<img src="http://s7d3.scene7.com/is/image/LuxotticaRetail/679420297255_shad_qt?wid=150&hei=65&fmt=jpeg&qlt=65&op_usm=2.0,0.2,0,0&op_sharpen=0">
</div>
<div class="price-container">
<ul class="price-list">
<li><h4>Model</h4><hr><p>Model:<br>
SKU: 679420297255<br></p></li>
<li><h4>Quantity</h4><hr><p>1</p></li>
<li><h4>Quantity</h4><hr><p>191.60</p></li>
<br>
<li>Status:Cancelled</li>
</ul>
<hr>
</div>
<div class="price-table">
<ul class="price-total">
<li>Sub-total (includes VAT)</li>
<li>Packaging & Postage</li>
<li style='border-top:1px solid black;margin-top:20px;padding-top:18px'>Order Total</li>
<li>�191.60</li>
<li >�0.00</li>
<li style='border-top:1px solid black;margin-top:18px;padding-top: 18px'>�191.60</li>
</ul>
</div>
</div>
<hr class="line-4">
</body>
</html>
I am creating a site similar to jsbin in that site i have created menubar which is in black color and below menubar there is code container which is in grey color where user will type a code my problem is the codecontainer is overlaping the menu bar little not 100% i donot want to over lap it so how do i solve this problem
here is my code
HTML
<html>
<head>
<title>CodePlayer</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<link rel="stylesheet" href="StyleSheets/CodePlayerStyleSheet.css">
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="wrapper">
<!--------------------MENUBAR---------------------------------->
<div id="menubar">
<div id="logo">CodePlayer</div>
<div id="btnrun"><button id="runbtn">Run</button></div>
<div id="menubar">
<ul id="menulist">
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li style="border:none;width:15%">Output</li>
</ul>
</div>
</div>
<!-------------------------------------------------------->
<div class="emptydiv"></div>
<!------------------CODECONTAINER---------------------------------------->
<div class="codecontainer" id="htmlcontainer">
<textarea>Example</textarea>
</div>
</div>
<!--------------------------------------------------------------->
<script>
</script>
</body>
</html>
CSS
body{
margin:0;
padding:0;
}
#menubar{
background-color: #000000;
width:100%;
height:50px;
}
#logo{
font-family: 'Lobster', cursive;
color:white;
font-size:30px;
padding:5px 0 0 15px;
float:left;
}
#runbtn{
float:right;
font-size:15px;
background-color:rgba(0,0,0,1.00);
border:1px solid #FFFFFF;
width:60px;
height:20px;
border-radius:10px;
color:white;
cursor:pointer;
position:relative;
top:8px;
}
#btnrun{
padding: 12px 20px 0 0;
}
#menulist{
list-style:none;
margin:0 auto;
border:1px solid #FFFFFF;
width:296px;
height:30px;
padding:0;
position:relative;
top:2px;
}
#menulist li{
float:left;
color:white;
border-right:1px solid white;
padding:5px 12px 7px 15px;
cursor:pointer;
}
li:hover{
background-color:#FFFFFF;
color:rgba(0,36,255,1.00) !important;
}
.emptydiv{
clear:both;
}
.codecontainer{
background-color:rgba(177,177,177,1.00);
color:black;
float:left;
height:100%;
width:25%;
}
Make the following change
#menubar {
background-color: #000000;
width:100%;
height:auto;
padding: 10px; /* you can change this, but it's to add some spacing on your menubar */
}
My divs cover each other which is not intended. I have run it through a debugger and nothing came up...
I'm trying to build a pop-up menu.
This is my html:
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="noteBack.css">
</head>
<body>
<div class="container">
<header><span>Note</span></header>
<div class="sub-header"><span>friday 25.7.13 </span></div>
</div>
</body>
</html>
this is my css:
.container{
position:relative;
width:382px;
border:1px solid black;
}
header{
position:absolute;
width:100%;
height:41px;
color:white;
background-color:#de4b4b;
font-weight: bold;
font-size:14px;
margin:auto;
}
header span{
display:inline-block;
padding-left:172px;
padding-top:14px;
padding-bottom:14px;
}
.sub-header{
position:absolute;
width:100%;
height:37px;
background-color:white;
font-size:10px;
margin:auto;
}
.sub-header span{
display:inline-block;
padding:bottom:14px;
}
any help would be appreciated.
JsFiddle
Your positioning system is causing problem ,Try this css
.container{
/*container position should be absolute*/
position:absolute;
width:382px;
border:1px solid black;
}
header{
/*header position should be relative*/
position:relative;
width:100%;
height:41px;
color:white;
background-color:#de4b4b;
font-weight: bold;
font-size:14px;
margin:auto;
}
header span{
display:inline-block;
padding-left:172px;
padding-top:14px;
padding-bottom:14px;
}
.sub-header{
/*sub-header position should be relative*/
position:relative;
width:100%;
height:37px;
background-color:white;
font-size:10px;
margin:auto;
}
.sub-header span{
display:inline-block;
padding:bottom:14px;
}
I essentially have two problems. The first being that my links to each of my web pages do not work. I used intellisence to select the URL for the page files so I am not sure why I keep getting a "resource cannot be found" error when I run the solution and click on the links. The second problem is that I am trying to create my first responsive website. I am currently working on modifying the navigation menu so that when the screen goes below a specific width, it changes to being combined into a single dropdown menu (with styles to make it look good). I am using open source script to run the change. The script file is called responsivemobilemenu.js.
This is my HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Atlas Web Pages</title>
#Styles.Render("~/Content/css")
#Scripts.Render("~/bundles/modernizr")
<script src="#Url.Content("~/Scripts/knockout-2.1.0.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery-1.7.1.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/responsivemobilemenu.js")" type="text/javascript"></script>
</head>
<body>
<div class="box-effect">
<header id="header">
<div class="web-header">
<div class="logo-image">
<img style="vertical-align:top" src="~/Images/WebPageLogo.png" height="85" width="820" alt="Atlas Logo" />
<br />
</div>
<div id="follow-icons">
<img src="~/Images/FBIcon.png" alt="Follow on Facebook" height="40" width="40" />
<img src="~/Images/TwitIcon.png" alt="Follow on twitter" height="40" width="40" />
<img src="~/Images/YTIcon.png" alt="Subscribe on Youtube" height="40" width="40" />
<img src="~/Images/GMailIcon.png" alt="Send me an Email" height="40" width="40" />
</div>
</div>
</header>
<div class="rmm">
<ul>
<li>Home</li>
<li>The Team</li>
<li>Current Line-Up</li>
<li>Retired Equipment</li>
<li>Tournaments</li>
<li>Videos</li>
<li>Sponsors</li>
</ul>
</div>
<div id="body-content">
#RenderSection("featured", required: false)
<section class="content-wrapper clear-fix">
#RenderBody()
</section>
</div>
#Scripts.Render("~/bundles/jquery")
#RenderSection("scripts", required: false)
</div>
</body>
</html>
this is the css for the menu:
.rmm {
display:block;
position:relative;
width:100%;
padding:0px;
margin:0 auto !important;
text-align: center;
line-height:19px !important;
}
.rmm * {
-webkit-tap-highlight-color:transparent !important;
font-family:Arial;
}
.rmm a {
color:#ebebeb;
text-decoration:none;
}
.rmm .rmm-main-list, .rmm .rmm-main-list li {
margin:0px;
padding:0px;
}
.rmm ul {
display:block;
width:auto !important;
margin:0 auto !important;
overflow:hidden;
list-style:none;
}
/* sublevel menu - in construction */
.rmm ul li ul, .rmm ul li ul li, .rmm ul li ul li a {
display:none !important;
height:0px !important;
width:0px !important;
}
.rmm .rmm-main-list li {
display:inline;
padding:0px;
margin:0px !important;
}
.rmm-toggled {
display:none;
width:100%;
position:relative;
overflow:hidden;
margin:0 auto !important;
}
.rmm-button:hover {
cursor:pointer;
}
.rmm .rmm-toggled ul {
display:none;
margin:0px !important;
padding:0px !important;
}
.rmm .rmm-toggled ul li {
display:block;
margin:0 auto !important;
}
/* GRAPHITE STYLE */
.rmm.graphite .rmm-main-list li a {
display:inline-block;
padding:8px 30px 8px 30px;
margin:0px -3px 0px -3px;
font-size:15px;
text-shadow:1px 1px 1px #333333;
background-color:#444444;
border-left:1px solid #555555;
background-image:url('../rmm-img/graphite-menu-bg.png');
background-repeat:repeat-x;
}
.rmm.graphite .rmm-main-list li a:hover {
background-image:url('../rmm-img/graphite-menu-bg-hover.png');
}
.rmm.graphite .rmm-main-list li:first-child a {
-webkit-border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-topleft: 6px;
-moz-border-radius-bottomleft: 6px;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.rmm.graphite .rmm-main-list li:last-child a {
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-topright: 6px;
-moz-border-radius-bottomright: 6px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.rmm.graphite .rmm-toggled {
width:95%;
background-color:#555555;
min-height:36px;
border-radius:6px;
}
.rmm.graphite .rmm-toggled-controls {
display:block;
height:36px;
color:white;
text-align:left;
position:relative;
background-image:url('../rmm-img/graphite-menu-bg.png');
background-repeat:repeat-x;
border-radius:6px;
}
.rmm.graphite .rmm-toggled-title {
position:relative;
top:9px;
left:15px;
font-size:16px;
color:white;
text-shadow:1px 1px 1px black;
}
.rmm.graphite .rmm-button {
display:block;
position:absolute;
right:15px;
top:8px;
}
.rmm.graphite .rmm-button span {
display:block;
margin-top:4px;
height:2px;
background:white;
width:24px;
}
.rmm.graphite .rmm-toggled ul li a {
display:block;
width:100%;
background-color:#555555;
text-align:center;
padding:10px 0px 10px 0px;
border-bottom:1px solid #333333;
border-top:1px solid #777777;
text-shadow:1px 1px 1px #333333;
}
.rmm.graphite .rmm-toggled ul li a:active {
background-color:#444444;
border-bottom:1px solid #444444;
border-top:1px solid #444444;
}
/* MINIMAL STYLE */
.rmm.minimal a {
color:#333333;
}
.rmm.minimal a:hover {
opacity:0.7;
}
.rmm.minimal .rmm-main-list li a {
display:inline-block;
padding:8px 30px 8px 30px;
margin:0px -3px 0px -3px;
font-size:15px;
}
.rmm.minimal .rmm-toggled {
width:95%;
min-height:36px;
}
.rmm.minimal .rmm-toggled-controls {
display:block;
height:36px;
color:#333333;
text-align:left;
position:relative;
}
.rmm.minimal .rmm-toggled-title {
position:relative;
top:9px;
left:9px;
font-size:16px;
color:#333333;
}
.rmm.minimal .rmm-button {
display:block;
position:absolute;
right:9px;
top:7px;
}
.rmm.minimal .rmm-button span {
display:block;
margin:4px 0px 4px 0px;
height:2px;
background:#333333;
width:25px;
}
.rmm.minimal .rmm-toggled ul li a {
display:block;
width:100%;
text-align:center;
padding:10px 0px 10px 0px;
border-bottom:1px solid #dedede;
color:#333333;
}
.rmm.minimal .rmm-toggled ul li:first-child a {
border-top:1px solid #dedede;
}
Try this
<li>Home</li>
<li>The Team</li>
<li>Current Line-Up</li>
<li>Retired Equipment</li>
<li>Tournaments</li>
<li>Videos</li>
<li>Sponsors</li>
You should consider using Html Helper.
#Html.ActionLink("Link Text", "Action Name", "Controller Name")
I have to div's that will not go next to each other. The menu on the left keeps going below and I can not bring it up. I have tried using "top:-..." but it will not work! Please help!
HTML:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Design At Ease - Home</title>
</head>
<body>
<div id="header">
<div id="logo"><a class="logoclass" href="index.html">DesignAtEase.com</a></div>
<ul id="headerlinks">
<li>Home</li>
<li>Coding</li>
<li>Graphics</li>
<li>Database</li>
<li>Support</li>
<li>More</li>
</ul>
</div>
<ul id="quicklinks">
<li>Quick Start</li>
<li>Tag Helper</li>
<li>HTML</li>
<li>CSS</li>
<li>Photoshop</li>
</ul>
<div id="wrapper">
<div id="midwrap"></div>
<a class="Resources">Resources</a>
<ul id="sidelinksleft">
<li>Quick Start</li>
<li>Tag Helper</li>
<li>News</li>
<li>Learn</li>
<li>Useful Sites</li>
</ul>
</div>
</body>
</html>
CSS:
html, body {height: 100%;}
* { height: 100%; }
body{
position:relative;
background:#fffffc;
margin: auto auto;
height:100%;
}
#header{
background:#e5e5e5;
height:35px;
width:100%;
border-bottom: 1px #c9c9c9 solid;
}
#headerlinks{
position:relative;
display:inline;
float:right;
margin-right:5%;
bottom:44px;
}
#headerlinks li{
display:inline;
padding-left:25px;
}
#headerlinks li a{
color:#777777;
display:inline;
font-size:18px;
font-family: sans-serif;
text-decoration:none;
}
#headerlinks li a:hover{
color:#a3a3a3;
display:inline;
font-size:18px;
font-family: sans-serif;
text-decoration:none;
}
#headerlinks li a:active{
color:#00B2EE;
display:inline;
font-size:18px;
font-family: sans-serif;
text-decoration:none;
}
#logo{
position:relative;
color:black;
margin-left:5%;
top:5px;
}
.logoclass{
color:#212121;
display:inline;
font-size:24px;
font-family: sans-serif;
text-decoration:none;
}
#quicklinks{
width:90%;
margin-left:auto;
margin-right:auto;;
height:25px;
background:#e5e5e5;
border-bottom: 1px #c9c9c9 solid;
border-left: 1px #c9c9c9 solid;
border-right: 1px #c9c9c9 solid;
top:-66px;
position:relative;
clear: right;
}
#quicklinks li{
position:relative;
top:2px;
display:inline;
padding-right:20px;
}
#quicklinks li a{
color:#777777;
display:inline;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
}
#quicklinks li a:hover{
color:#a3a3a3;
display:inline;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
}
#quicklinks li a:active{
color:#00B2EE;
display:inline;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
}
#wrapper{
position:relative;
top:-82px;
margin-right:4%;
margin-left:4%;
width:92%;
height:100%;
background:#fafafa;
border-left: 1px #c9c9c9 solid;
border-right: 1px #c9c9c9 solid;
overflow:hidden;
}
#sidelinksleft{
margin-left:auto;
margin-right:auto;;
height:25px;
position:relative;
clear: right;
float:left;
margin-left:-25px;
top:15px;
}
#sidelinksleft li{
position:relative;
padding-top:3px;
list-style-type: none;
}
#sidelinksleft li a{
color:#000000;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
background-color:#82CFFD;
height:17px;
position:relative;
border:1px solid black;
width:150px;
padding-left:3px;
padding-top:2px;
padding-bottom:2px;
display:block;
margin-bottom:2px;
}
#sidelinksleft li a:hover{
color:#000000;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
background-color:#B0E2FF;
height:17px;
position:relative;
border:1px solid black;
width:150px;
padding-left:3px;
padding-top:2px;
padding-bottom:2px;
display:block;
margin-bottom:2px;
}
#sidelinksleft li a:active{
color:#000000;
font-size:13px;
font-family: sans-serif;
text-decoration:none;
background-color:#82CFFD;
height:17px;
position:relative;
border:1px solid black;
width:150px;
padding-left:3px;
padding-top:2px;
padding-bottom:2px;
display:block;
margin-bottom:2px;
}
.Resources{
color:#000000;;
font-size:16px;
font-family: sans-serif;
position:relative;
margin-left:-156px;
}
#midwrap{
width:70%;
height:90%;
border-left: 1px solid black;
border-right: 1px solid black;
margin-left:300px;
background:black;
top:10px;
position:relative;
overflow: hidden;
}
And I have no more detail, but it is saying I need more so I am typing this random paragraph to make it so I can post my question.
Your left-margin (300px) and width of div(70%) is too much for your left nav to stay in place.
div by default is a block element and here in your case it occupies the whole space of the container, So float your div too as you float your left nav and remove clear from left nav to have it sit with the float as that appears before the div. and give clear:right on div.
So modified styles:
#midwrap {
width:70%;
height:90%;
border-left: 1px solid black;
border-right: 1px solid black;
margin-left:100px; /*Reducing this to 100px*/
background:black;
top:10px;
position:relative;
overflow: hidden;
float:right; /*float right*/
clear: right; /*add this here*/
}
#sidelinksleft {
margin-left:auto;
margin-right:auto;
float:left;
height:25px;
position:relative;
/*removed clear from here*/
float:left;
margin-left:-25px;
top:15px;
}
Demo
See the following HTML code:
<body>
<div id="header">
<div id="logo"><a class="logoclass" href="index.html">DesignAtEase.com</a></div>
<ul id="headerlinks">
<li>Home</li>
<li>Coding</li>
<li>Graphics</li>
<li>Database</li>
<li>Support</li>
<li>More</li>
</ul>
</div>
<ul id="quicklinks">
<li>Quick Start</li>
<li>Tag Helper</li>
<li>HTML</li>
<li>CSS</li>
<li>Photoshop</li>
</ul>
<div id="wrapper">
<div style="float:left;">
<a class="Resources">Resources</a>
<ul id="sidelinksleft">
<li>Quick Start</li>
<li>Tag Helper</li>
<li>News</li>
<li>Learn</li>
<li>Useful Sites</li>
</ul>
</div>
<div id="midwrap"></div>
<div style="clear: both;"></div>
</body>
I created a div holding the menu and used the float: left property.