Forum Moderators: not2easy

Message Too Old, No Replies

need help

css is contradiciting?

         

cripplertd

5:27 pm on Sep 19, 2007 (gmt 0)

10+ Year Member



when trying to add a menu css style my header and footer contents disappear..

body {
margin:0;
border:0;
padding:0;
height:100%;
max-height:100%;
background:#fff;
font-family:arial, verdana, sans-serif;
font-size:76%;
overflow: hidden;
}

/* for internet explorer */
* html body {
padding:120px 0 50px 0;
}

#content {
font-family:"times new roman", serif;
font-size: 1.2em;
position:fixed;
top:0px;
left:0;
bottom:50px;
right:0;
overflow:auto;
background:#fff;
padding:2px;
text-align:left;
}

* html #content {
height:100%;
width:100%;
}

#header {
position:absolute;
top:0;
left:0;
width:100%;
height:100px;
overflow:auto;
background:#53829d;
border-bottom:4px solid #73a2bd;
}
* html #header {height:5%;}

#footer {
position:absolute;
bottom:0;
left:0;
width:100%;
height:15px;
overflow:auto;
text-align:right;
background:#73a2bd;
border-top:5px solid #53829d;
}
* html #footer {height:5%;}

/* end of bit that does the work */

h1 {font-size:4em; margin:0; padding:0;}

#footer p {
color:#fff;
margin:5px 10px 0 10px;
}

#header img {
margin:10px 10px 0 10px;
}
#content img {margin:5px;}
#absolute {
position:absolute;
top:200px;
right:100px;
width:200px;
background:#ddd;
padding:10px;
border:1px solid #000;
}

#left {
float:left;
background:#eee;
padding:10px;
border:1px solid #000;
color:#000;
width:50%;
}

#right {
float:right;
background:#ddd;
padding:10px;
border:1px solid #000;
color:#000;
}

a, a:visited {
font-size:1.1em;
text-decoration:none;
color:#ddd;
}

a:hover {
color:#fff;
text-decoration:none;
}

.grey {color:#888;}

.ltgrey {color:#ddd;}

img#mascot {float:right;}

#header ul {
clear:both;
text-align:center;
border-top:1px solid #73a2bd;
}

#header ul {
margin:0;
padding:0;
list-style-type:none;
background:transparent;
height:3em;
}

#header ul li {
display:inline;
color:#73a2bd;
}

/////Menu css below\\\\
.chromestyle{
width: 100%;
font-weight: bold;
}

.chromestyle:after{ /*Add margin between menu and rest of content in Firefox*/
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.chromestyle ul{
border: 1px solid #BBB;
width: 100%;
background: url(chromebg.gif) center center repeat-x; /*THEME CHANGE HERE*/
padding: 4px 0;
margin: 0;
text-align: left; /*set value to "left", "center", or "right"*/
}

.chromestyle ul li{
display: inline;
}

.chromestyle ul li a{
color: #494949;
padding: 4px 7px;
margin: 0;
text-decoration: none;
border-right: 1px solid #DADADA;
}

.chromestyle ul li a:hover{
background: url(chromebg-over.gif) center center repeat-x; /*THEME CHANGE HERE*/
}

.chromestyle ul li a[rel]:after{ /*HTML to indicate drop down link*/
content: " v";
/*content: " " url(downimage.gif); /*uncomment this line to use an image instead*/
}

/* ######### Style for Drop Down Menu ######### */

.dropmenudiv{
position:absolute;
top: 0;
border: 1px solid #BBB; /*THEME CHANGE HERE*/
border-bottom-width: 0;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
background-color: white;
width: 200px;
visibility: hidden;
filter: progid:DXImageTransform.Microsoft.Shadow(color=#CACACA,direction=135,strength=4); /*Add Shadow in IE. Remove if desired*/
}

.dropmenudiv a{
width: auto;
display: block;
text-indent: 3px;
border-bottom: 1px solid #BBB; /*THEME CHANGE HERE*/
padding: 2px 0;
text-decoration: none;
font-weight: bold;
color: black;
}

* html .dropmenudiv a{ /*IE only hack*/
width: 100%;
}

.dropmenudiv a:hover{ /*THEME CHANGE HERE*/
background-color: #F0F0F0;
}

Marshall

5:40 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why are you doing this:

* html #footer {height:5%;}

rather than

#footer {height:5%;}

Forgive me, but there are things in your code that do not make sense to me. Did you validate it? It says there is a parse error in #left background. You should have background-color:#eee;

Marshall

cripplertd

5:43 pm on Sep 19, 2007 (gmt 0)

10+ Year Member



Did you validate it?

huh?

cripplertd

5:47 pm on Sep 19, 2007 (gmt 0)

10+ Year Member



i'm new to css stuff, these were example code's off my friends site, there's bound to be content i dont need that is messing sstuff up.

Marshall

6:38 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Go to [w3.org...] and scroll down the left for the CSS and HTML validators.

Marshall