|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IE Float model bug
After reading some docs I'm pretty sure this is the float model bug in IE6? Either that or the Box model bug. How do I go about fixing this? If you look at the code and render it, the very top box is off to the right about 3 pixels in relation to the two boxes below it. I read somewhere how to fix this but I dont remember where the article was.
Any help would be appreciated...ripping my hair out ![]() Code:
<HTML>
<HEAD>
<title>
Test
</title>
<style>
.defaultText {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
color: #000000;
background-color: #EEE;
font-family: Verdana, sans-serif;
font-size: smaller;
margin: 10px 10px 0px 10px;
}
.titleText {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
color: #000000;
}
.addModuleText {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
}
.moduleTitle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
color: #000000;
}
#bodyWrapper {
border: 1px solid #000;
background-color: #559CEC;
width: 100%;
}
#container {
float: left;
width: 100%;
margin-right: -260px;
}
#content {
padding-top: 0px;
margin-right: 260px;
}
#left {
position: relative;
left: 5px;
width: 250px;
float: left;
}
#middle {
margin-left: 250px;
padding: 0px 7px 10px 10px;
}
#sidebar {
float: right;
padding-top: 0px;
padding-right: 5px;
}
#footer {
background: #999;
border: 1px solid #cecea5;
clear: both;
}
#module {
position:relative;
width: 100%;
padding: 2px;
background: #FFF;
border: 1px solid #000;
font-size: 10px;
margin-bottom: 8px;
}
#title {
background-color: #C2DBF5;
padding: 3px;
border: 1px solid #144678;
text-align: left;
color: Black;
font-weight: bold;
font-size: 14px;
}
#moduleItem {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
#moduleItem h1 {
font-weight: bold;
font-size: 12px;
margin-bottom: 0px;
}
#moduleItem p {
margin-top: 0px;
margin-bottom: 10px;
}
#module #footer {
background-color: #C2DBF5;
border: 1px solid #144678;
padding: 4px;
text-align: left;
color: black;
font-weight: normal;
font-size: 10px;
}
</style>
</HEAD>
<BODY>
<DIV id="bodyWrapper">
<DIV id="addNewModule"></div>
<DIV id="container">
<DIV id="content">
<DIV id="left"></DIV>
<DIV id="middle">
<div id="module">
<div id="title"><span id="_ctl0_Title_lblTitle">test</span></div>
<div id="moduleItem">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td>
<h1>Test</h1>
</td>
</tr>
</table>
</div>
</div>
<div id="module">
<div id="title"><span id="_ctl1_Title_lblTitle">Homework files</span></div>
<div id="moduleItem">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td>
<h1>Text1</h1>
</td>
</tr>
</table>
</div>
</div>
<div id="module">
<div id="title"><span id="_ctl2_Title_lblTitle">Some Module Title</span></div>
<div id="moduleItem">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td>
<h1>Text2</h1>
</td>
</tr>
</table>
</div>
</div></DIV>
</DIV>
</DIV>
<DIV id="sidebar">
</DIV>
</div>
</form>
</BODY>
</HTML>
__________________
"Mankind cannot define memory, yet it defines mankind" Last edited by dkode : June 29th, 2004 at 01:25 PM. |
|
#2
|
||||
|
||||
|
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
|
#3
|
||||
|
||||
|
you ought to validate your code before you ask to solve problems with the code. http://validator.w3.org/
the id's have to be unique, you can only use a id once within a document. http://www.w3.org/TR/html4/struct/global.html#h-7.5.2 you ought to use a proper doctype, choose one that makes the browsers render your page in standard compliance mode. see here for a list http://www.hut.fi/~hsivonen/doctype.html you don't have very good structur of your markup, you shouldn't have more that one h1-element, and you should drop all those unnecessary tables, use css to controll the layout. http://www.webaim.org/techniques/structure/ |
|
#4
|
|||
|
|||
|
i'm going through trying to clean up some of the code now. couple of questions though:
1. If i can't use an ID more than once in a document then what do I use for repeating dynamic content from a database? class attrtibutes? 2. The 3pixel box hack from positioniseverything.net fixed the 3px jog problem. thank you! 3. When you said I don't have good markup (I shouldn't use H1 more than once in the document?) So do I just make custom class attributes and use them instead if I am going to be repeating content? Someone told me once not too use too many class and id's, but instead use <p> and <h*> tags if they are relevant to displaying text instead of layout. any information would help! thank you. |
|
#5
|
|||||
|
|||||
|
Quote:
Quote:
Quote:
cheers, gary Last edited by kk5st : June 30th, 2004 at 02:26 PM. |
|
#6
|
|||
|
|||
|
thank you!
that clears up alot for me except the part about the unique ID's? When you said an id identifies a unique id in the group, does this mean I declare the id only once in the stylesheet but then can use it as many times as I want through the document? what did the other guy mean by that they have to be unique? I only have one of each id in the stylesheet. |
|
#7
|
||||
|
||||
|
if you read the links i provided, you would have gotten the answers you needed.
you can only use one id on one html-element but can refeere to this element several times in the style sheet, like #one { text-align:center} #one em { color:red;} <p id="one">just an <em>example</em></p> Last edited by Akh : June 30th, 2004 at 04:46 PM. |
|
#8
|
|||
|
|||
|
ahhh I understand now.
So it was wrong for me to do the following: Code:
#header #loginControl {
<!--some code here-->
}
It should have been: Code:
#loginControl {
<!--some code here-->
}
I will read that link again, thanks |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > IE Float model bug |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|