|
| |
|
|
Ls3
Posts: 1 Joined: 7/13/2003 Status: offline
|
Element height quandary - 7/13/2003 15:47:40
Hi, I' m converting my table-centric website over to a table-less layout using CSS, but I' ve encountered a problem with trying to set heights. Could someone point out what I' m doing wrong?
body {
font: 11px Verdana, Arial, sans-serif;
background: #CCCCCC;
margin: 0px;
padding: 0px;
}
#page{
width: 630px;
border: none;
margin-right: auto;
margin-left: auto;
}
#content {
border-left:1px solid; border-top:1px solid; border-bottom:1px solid;
background-color:#F0F0F0;
background-image: url(' /dead1.jpg' );
background-repeat: norepeat;
background-attachment: scroll;
background-position: top;
float: left;
border-right: 0px none;
width: 359px;
margin: 20px 0px;
}
#banner {
float: left;
background: #191818;
width: 98px;
margin: 0px 0px 0px 0px;
border: 1px solid;
border-color: #000000;
border-top: 0px;
border-bottom: 0px;
height:100%;
}
#navigation{
border-right:1px solid; border-top:1px solid; border-bottom:1px solid;
background-color:#F0F0F0;
background-image: url(' /dead1.jpg' );
background-repeat: norepeat;
background-attachment: scroll;
background-position: top;
float: left;
width:169px;
margin: 20px 0px;
border-left:0px none;
}
|
|
|
|
Donkey
Posts: 3888 Joined: 11/13/2001 From: Blackfield United Kingdom Status: online
|
RE: Element height quandary - 7/19/2003 8:07:08
I' m having a simillar problem on an unpublished test site that I' m using to learn CSS. I am creating navigation buttons using <h1><h2> etc. to set the style and <div.a><div.b>etc. to set position but the height setting does not appear to do anything. I am using IE ver. 6.0.2800.11061S. This is the relevant code from the stylesheeth3 {
color : #FFFF33; font-family : Verdana; font-weight: normal; font-size: 14px; text-align: center;
background-color: #9cf; border-style: solid; border-color: #ccf #336 #669 #99f ; border-width:
4px }
div.a{ position: absolute; left: 10px; top: 60px; width: 120px;}
div.b{ position: absolute; left: 10px; top: 87px; width: 120px;}
div.c{ position: absolute; left: 10px; top: 114px; width: 120px;}
div.d{ position: absolute; left: 10px; top: 141px; width: 120px;}
a.gray:link {font-style: normal; font-weight: normal; text-decoration: none; color: #ffff99}
a.gray:visited {font-style: normal; font-weight: normal; text-decoration: none; color: #000099}
a.gray:hover {font-style: normal; font-weight: normal; text-decoration: none; color: #cc0000}
a.gray:active {font-style: normal; font-weight: normal; text-decoration: none; color: #cc0000} And this is an example of the code on the page;<div class=" a" >
<h3><a class=" gray" href=" http://Domain Name 1" >Domain Name 1</a></h3></div>
<div class=" b" >
<h3><a class=" gray" href=" http://Domain Name 2" >Domain Name 2</a></h3></div> The " buttons" form OK and in the right places, but the height is dependent on the font size and adding say " height: 200 px; " to the <div> description on the style sheet makes no difference. Am I making a basic mistake here or is the height attribute not recognised by the browser? Peter
|
|
|
|
Donkey
Posts: 3888 Joined: 11/13/2001 From: Blackfield United Kingdom Status: online
|
RE: Element height quandary - 7/19/2003 11:27:43
Thanks for the info Wolf, I will check out the links and see what I can learn. When you say use a.xxxx I assume you mean use another class of anchor tag with formatted borders? I' ll try that later and see if it works. Thanks again. Peter
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|