Hi,
I have really screwed up my css file. I have a nice little menu on the left side of the css file. Menu expands and collapes with the help of a java script which I did not include.
My problem is that when I expand the menu the information in my Content tag exapands along with the menu.
How do I arrange my <div> tags to make the menu expand and collapse when the user wants it to but the content on the right side stays.
HTML PAGE
<div id="leftnav">
<h2>Emerald</h2>
<div class="leftlink"><a href="manuf.html">Equipment</a>
</div>
<a class="msg_head">By Brand</a>
<div style="display: none;" class="s2">
<div class="leftlink3">
<a href="pegson.html" title="Pegson">Pegson</a></div> <div class="leftlink3">
<a href="powerscreen.html" title="Powerscreen">Powerscreen</a></div> <div class="leftlink3">
<a href="#" title="Click to View Cedarapdis">Cedarapids</a></div>
</div>
<a class="msg_head">By Application</a>
<div style="display: none;" class="s2">
<a class="msg_head" title="Click to Crushing Impactor">Crushing/Impactor</a>
<div style="display: none" class="s2">
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH250</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH320 & XH320SR</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH500 & XH500SR</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XV350</a></div>
</div>
<a class="msg_head" title="Click to View Crushing Jaw">Crushing/Jaw</a>
<div style="display: none" class="s2">
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">Metrotrak & Metrotrak HA</a>
</div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">XA750</a>
</div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">XA400S & XR400S</a>
</div>
</div>
<div class="leftlink">
<a href="videos.html">Equipment Videos</a>
</div>
<div class="leftlink">
<a href="used_equipment.cfm">Used Equipment</a>
</div>
</div>
<div id="content">
<h2>Welcome to <span style="font-weight:bold; color:#00234C;">Emerald</span></h2></div>
CSS CODE
html, body {
margin : 0;
padding : 0;
}
body {
font : 73% "Trebuchet MS", Arial, Helvetica, Tahoma, sans-serif;
background-image: url(images/bg_tile.gif);
background-repeat:repeat-x repeat-y;
}
/*WRAP*/
#container {
width : 800px;
margin : 0 auto;
border : 5px solid #00234c;
line-height : 2em;
color : #000;
background-color: #FFFFFF;
}
/*TOP BANNER*/
#top {
padding : 0;
height : 100px;
color : #00234c;
background-color: #FFFFFF;
background-image: url(images/ees_logo.jpg);
background-repeat: no-repeat;
}
#top h1 {
padding : 5px 0 0 25px;
margin : 0;
font-size : 140%;
letter-spacing : 5px;
}
/*TOP NAVIGATION*/
#navcontainer {
border-bottom-width: 5px;
border-bottom-style: solid;
border-bottom-color: #00234c;
}
#navcontainer ul {
text-align : center;
padding-bottom : 3px;
padding-top : 3px;
padding-left : 0;
margin-top : 0;
margin-bottom : 0;
margin-left : 0;
color : white;
width : 100%;
font-family : Arial, Helvetica, sans-serif;
line-height : 18px;
background-color: #00234C;
}
#navcontainer ul li {
display : inline;
padding-left : 0;
padding-right : 0;
padding-bottom : 5px;
padding-top : 5px;
}
#navcontainer ul li a {
padding-left : 10px;
padding-right : 10px;
padding-bottom : 5px;
padding-top : 5px;
color : white;
text-decoration : none;
border-right : 1px solid #fff;
}
#navcontainer ul li a:hover {
background : #369;
color : white;
}
#navcontainer #active {
border-left : 1px solid #fff;
}
/*MAIN CONTENT*/
#content {
width: 475px;
margin-left : 200px;
border-left-width: 5px;
border-left-style: solid;
border-left-color: #00234C;
top:0;
left:-25px;
margin-right:-25px;
}
padding: 1em;
}
#content p {
padding : 0 2em 0 2em;
}
/*LEFT SIDEBAR
#leftnav {
float : left;
width : 200px;
margin : 0;
padding : 1em;
}
#leftnav p {
margin : 0 0 1em 0;
}
#leftnavmenu {
list-style : none;
float : left;
width : 200px;
margin : 30px 0 30px 0;
padding : 0;
font-size : 0.9em;
}
#leftnavmenu ul {
list-style : none;
width : 150px;
margin : 0 0 20px 0;
padding : 0;
font-size : 1.1em;
}
#leftnavmenu li {
margin-bottom : 2px;
}
#leftnavmenu li a {
font-weight : bold;
height : 20px;
text-decoration : none;
color : #505050;
background : #eaeaea url(images/up.gif) no-repeat left center;
display : block;
padding : 4px 0 0 30px;
border-left : 0 solid #8fb8cc;
}
#leftnavmenu li a:hover {
background : #8fb8cc url(images/right.gif) no-repeat left center;
color : #fff;
border-left : 0 solid #003366;
} */
#leftnav {
width: 160px;
height: auto;
position: relative;
background-color:#FFFFFF;
padding:25px 10px 0px 10px;
top:0;
font-size:11px;
line-height:13px;
left:8px;
}
.leftlink3{
width:160px;
padding:0px;
height:auto;
font-size:12px;
line-height:20px;
border-bottom:1px solid #e5e5e5;
color:#ffffff;
}
.leftlink3 a{
display:block;
width:124px;
height:auto;
color:#999999;
text-decoration:none;
padding-left:36px;
background-image: url(images/left_links5.gif);
background-repeat:no-repeat;
background-position:left;
}
.leftlink3 a:hover{
color:#182038;
text-decoration:none;
padding-left:36px;
background-image: url(images/left_links5.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink3 a.current{
background-color:#edf0f3;
background-image: url(images/left_links6.gif);
background-repeat:no-repeat;
background-position:left;
color: #333333 ;
}
.leftlink3 a.current:hover{
background-color:#edf0f3;
background-image: url(images/left_links6.gif);
background-repeat:no-repeat;
background-position:right;
color: #333333 ;
}
a.msg_head, a.msg_head:active{
width:136px;
padding:0px;
position:relative;
top:0px;
height:auto;
font-size:12px;
display:block;
cursorointer;
line-height:20px;
border-bottom:1px solid #e5e5e5;
left:0px;
text-decoration:none;
padding-left:24px;
color:#999999;
background-image: url(images/left_links3.gif);
background-repeat:no-repeat;
background-position:left;
}
a.msg_head:hover{
padding-left:24px;
cursorointer;
color:#182038;
background-image: url(images/left_links3.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink{
width:160px;
padding:0px;
position:relative;
top:0px;
height:auto;
font-size:12px;
line-height:20px;
border-bottom:1px solid #e5e5e5;
left:0px;
color:#ffffff;
}
.leftlink a{
display:block;
width:148px;
height:auto;
color:#999999;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links2.gif);
background-repeat:no-repeat;
background-position:left;
}
.leftlink a:hover{
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links2.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink a.current{
display:block;
width:148px;
height:auto;
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links8.gif);
background-color:#edf0f3;
background-repeat:no-repeat;
background-position:left;
}
.leftlink a.current:hover{
display:block;
width:148px;
height:auto;
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links8.gif);
background-color:#edf0f3;
background-repeat:no-repeat;
background-position:right;
}
#s2{
width:160px;
margin-top:0px;
min-height:200px;
height:200px;
padding:0px 0px 0px 0px;
font-size:11px;
line-height:13px;
visibility:hidden;
}
/*FOOTER*/
#footer {
clear : both;
margin : 0;
padding : 0;
font-size : 1.0em;
color : #000000;
background-color: #FFFFFF;
text-align: center;
vertical-align: middle;
border-top-width: 5px;
border-top-style: solid;
border-top-color: #00234C;
}
* > html #footer img {
margin : 0;
}
#footer p {
padding : 0 0 0 5px;
}
/*TYPOGRAPHY*/
h2 {
margin : 1em 0 0.5em 0;
font-size : 130%;
letter-spacing : 5px;
}
blockquote {
padding : 5px;
font-weight : bold;
font-style : italic;
color : #000;
}
.quote {
border-top : 1px solid #dc291e;
padding : 10px;
color : #036;
}
/*SEARH BAR*/
form {
float : right;
margin-bottom : 15px;
margin-right : 15px;
}
input.search {
width : 100px;
border : none;
background : url(images/input.gif);
padding : 4px;
}
input.login {
width : 75px;
border : none;
background : url(images/logininput.gif);
padding : 4px;
}
/*LINKS*/
a:link, a:visited {
color : #000000;
background : transparent;
text-decoration : none;
}
a:hover {
color : #036;
background : #FFFFFF;
text-decoration : none;
}
a img {
border : none;
}
/*IMAGESS*/
.imgleft {
float : left;
padding : 5px;
margin-right : 10px;
}
/*CLASS*/
.post {
background-color : #FFFFFF;
padding : 3px;
margin : 20px 10px 0 5px;
border : 0 dashed #8a795d;
font-size : 80%;
}
.post .date {
background : url(images/clock.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
.post .comments {
background : url(images/comment.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
.post .readmore {
background : url(images/document.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
Any help would be greatly appreciated. I am not use to using CSS files.
Thanks
Sue
I have really screwed up my css file. I have a nice little menu on the left side of the css file. Menu expands and collapes with the help of a java script which I did not include.
My problem is that when I expand the menu the information in my Content tag exapands along with the menu.
How do I arrange my <div> tags to make the menu expand and collapse when the user wants it to but the content on the right side stays.
HTML PAGE
<div id="leftnav">
<h2>Emerald</h2>
<div class="leftlink"><a href="manuf.html">Equipment</a>
</div>
<a class="msg_head">By Brand</a>
<div style="display: none;" class="s2">
<div class="leftlink3">
<a href="pegson.html" title="Pegson">Pegson</a></div> <div class="leftlink3">
<a href="powerscreen.html" title="Powerscreen">Powerscreen</a></div> <div class="leftlink3">
<a href="#" title="Click to View Cedarapdis">Cedarapids</a></div>
</div>
<a class="msg_head">By Application</a>
<div style="display: none;" class="s2">
<a class="msg_head" title="Click to Crushing Impactor">Crushing/Impactor</a>
<div style="display: none" class="s2">
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH250</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH320 & XH320SR</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XH500 & XH500SR</a></div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Impactor">XV350</a></div>
</div>
<a class="msg_head" title="Click to View Crushing Jaw">Crushing/Jaw</a>
<div style="display: none" class="s2">
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">Metrotrak & Metrotrak HA</a>
</div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">XA750</a>
</div>
<div class="leftlink3">
<a href="#" title="Click to View Crushing Jaw">XA400S & XR400S</a>
</div>
</div>
<div class="leftlink">
<a href="videos.html">Equipment Videos</a>
</div>
<div class="leftlink">
<a href="used_equipment.cfm">Used Equipment</a>
</div>
</div>
<div id="content">
<h2>Welcome to <span style="font-weight:bold; color:#00234C;">Emerald</span></h2></div>
CSS CODE
html, body {
margin : 0;
padding : 0;
}
body {
font : 73% "Trebuchet MS", Arial, Helvetica, Tahoma, sans-serif;
background-image: url(images/bg_tile.gif);
background-repeat:repeat-x repeat-y;
}
/*WRAP*/
#container {
width : 800px;
margin : 0 auto;
border : 5px solid #00234c;
line-height : 2em;
color : #000;
background-color: #FFFFFF;
}
/*TOP BANNER*/
#top {
padding : 0;
height : 100px;
color : #00234c;
background-color: #FFFFFF;
background-image: url(images/ees_logo.jpg);
background-repeat: no-repeat;
}
#top h1 {
padding : 5px 0 0 25px;
margin : 0;
font-size : 140%;
letter-spacing : 5px;
}
/*TOP NAVIGATION*/
#navcontainer {
border-bottom-width: 5px;
border-bottom-style: solid;
border-bottom-color: #00234c;
}
#navcontainer ul {
text-align : center;
padding-bottom : 3px;
padding-top : 3px;
padding-left : 0;
margin-top : 0;
margin-bottom : 0;
margin-left : 0;
color : white;
width : 100%;
font-family : Arial, Helvetica, sans-serif;
line-height : 18px;
background-color: #00234C;
}
#navcontainer ul li {
display : inline;
padding-left : 0;
padding-right : 0;
padding-bottom : 5px;
padding-top : 5px;
}
#navcontainer ul li a {
padding-left : 10px;
padding-right : 10px;
padding-bottom : 5px;
padding-top : 5px;
color : white;
text-decoration : none;
border-right : 1px solid #fff;
}
#navcontainer ul li a:hover {
background : #369;
color : white;
}
#navcontainer #active {
border-left : 1px solid #fff;
}
/*MAIN CONTENT*/
#content {
width: 475px;
margin-left : 200px;
border-left-width: 5px;
border-left-style: solid;
border-left-color: #00234C;
top:0;
left:-25px;
margin-right:-25px;
}
padding: 1em;
}
#content p {
padding : 0 2em 0 2em;
}
/*LEFT SIDEBAR
#leftnav {
float : left;
width : 200px;
margin : 0;
padding : 1em;
}
#leftnav p {
margin : 0 0 1em 0;
}
#leftnavmenu {
list-style : none;
float : left;
width : 200px;
margin : 30px 0 30px 0;
padding : 0;
font-size : 0.9em;
}
#leftnavmenu ul {
list-style : none;
width : 150px;
margin : 0 0 20px 0;
padding : 0;
font-size : 1.1em;
}
#leftnavmenu li {
margin-bottom : 2px;
}
#leftnavmenu li a {
font-weight : bold;
height : 20px;
text-decoration : none;
color : #505050;
background : #eaeaea url(images/up.gif) no-repeat left center;
display : block;
padding : 4px 0 0 30px;
border-left : 0 solid #8fb8cc;
}
#leftnavmenu li a:hover {
background : #8fb8cc url(images/right.gif) no-repeat left center;
color : #fff;
border-left : 0 solid #003366;
} */
#leftnav {
width: 160px;
height: auto;
position: relative;
background-color:#FFFFFF;
padding:25px 10px 0px 10px;
top:0;
font-size:11px;
line-height:13px;
left:8px;
}
.leftlink3{
width:160px;
padding:0px;
height:auto;
font-size:12px;
line-height:20px;
border-bottom:1px solid #e5e5e5;
color:#ffffff;
}
.leftlink3 a{
display:block;
width:124px;
height:auto;
color:#999999;
text-decoration:none;
padding-left:36px;
background-image: url(images/left_links5.gif);
background-repeat:no-repeat;
background-position:left;
}
.leftlink3 a:hover{
color:#182038;
text-decoration:none;
padding-left:36px;
background-image: url(images/left_links5.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink3 a.current{
background-color:#edf0f3;
background-image: url(images/left_links6.gif);
background-repeat:no-repeat;
background-position:left;
color: #333333 ;
}
.leftlink3 a.current:hover{
background-color:#edf0f3;
background-image: url(images/left_links6.gif);
background-repeat:no-repeat;
background-position:right;
color: #333333 ;
}
a.msg_head, a.msg_head:active{
width:136px;
padding:0px;
position:relative;
top:0px;
height:auto;
font-size:12px;
display:block;
cursorointer;
line-height:20px;
border-bottom:1px solid #e5e5e5;
left:0px;
text-decoration:none;
padding-left:24px;
color:#999999;
background-image: url(images/left_links3.gif);
background-repeat:no-repeat;
background-position:left;
}
a.msg_head:hover{
padding-left:24px;
cursorointer;
color:#182038;
background-image: url(images/left_links3.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink{
width:160px;
padding:0px;
position:relative;
top:0px;
height:auto;
font-size:12px;
line-height:20px;
border-bottom:1px solid #e5e5e5;
left:0px;
color:#ffffff;
}
.leftlink a{
display:block;
width:148px;
height:auto;
color:#999999;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links2.gif);
background-repeat:no-repeat;
background-position:left;
}
.leftlink a:hover{
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links2.gif);
background-repeat:no-repeat;
background-position:right;
}
.leftlink a.current{
display:block;
width:148px;
height:auto;
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links8.gif);
background-color:#edf0f3;
background-repeat:no-repeat;
background-position:left;
}
.leftlink a.current:hover{
display:block;
width:148px;
height:auto;
color:#182038;
text-decoration:none;
padding-left:12px;
background-image: url(images/left_links8.gif);
background-color:#edf0f3;
background-repeat:no-repeat;
background-position:right;
}
#s2{
width:160px;
margin-top:0px;
min-height:200px;
height:200px;
padding:0px 0px 0px 0px;
font-size:11px;
line-height:13px;
visibility:hidden;
}
/*FOOTER*/
#footer {
clear : both;
margin : 0;
padding : 0;
font-size : 1.0em;
color : #000000;
background-color: #FFFFFF;
text-align: center;
vertical-align: middle;
border-top-width: 5px;
border-top-style: solid;
border-top-color: #00234C;
}
* > html #footer img {
margin : 0;
}
#footer p {
padding : 0 0 0 5px;
}
/*TYPOGRAPHY*/
h2 {
margin : 1em 0 0.5em 0;
font-size : 130%;
letter-spacing : 5px;
}
blockquote {
padding : 5px;
font-weight : bold;
font-style : italic;
color : #000;
}
.quote {
border-top : 1px solid #dc291e;
padding : 10px;
color : #036;
}
/*SEARH BAR*/
form {
float : right;
margin-bottom : 15px;
margin-right : 15px;
}
input.search {
width : 100px;
border : none;
background : url(images/input.gif);
padding : 4px;
}
input.login {
width : 75px;
border : none;
background : url(images/logininput.gif);
padding : 4px;
}
/*LINKS*/
a:link, a:visited {
color : #000000;
background : transparent;
text-decoration : none;
}
a:hover {
color : #036;
background : #FFFFFF;
text-decoration : none;
}
a img {
border : none;
}
/*IMAGESS*/
.imgleft {
float : left;
padding : 5px;
margin-right : 10px;
}
/*CLASS*/
.post {
background-color : #FFFFFF;
padding : 3px;
margin : 20px 10px 0 5px;
border : 0 dashed #8a795d;
font-size : 80%;
}
.post .date {
background : url(images/clock.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
.post .comments {
background : url(images/comment.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
.post .readmore {
background : url(images/document.gif) no-repeat left center;
padding-left : 15px;
margin : 0 15px 0 5px;
}
Any help would be greatly appreciated. I am not use to using CSS files.
Thanks
Sue