Forum Moderators: not2easy

Message Too Old, No Replies

Firefox & Margins/Padding

living together less than peaceably

         

unpoedic

7:50 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



The novice inquires:

Why would div layer margins and/or padding, e.g.,

.footer-txt {
padding : 50px 10px 15px 10px;
}

(full CSS upon request)

be recognized in IE but not Firefox? In Firefox the code is either recognized incorrectly, or not at all.

4hero

8:14 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



Hi unpoedic,

All should be fine with this. Can you post the full html/css and I'll take a look?

Don_Hoagie

8:38 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



i've never placed a dash in a selector before... is it possible that CSS prohibits this, as the dash is reserved for multi-word properties? That does seem like the kind of thing that would go unnoticed by IE and penalized by FF.

Otherwise, yeah, it's something else in your code that's causing the issue.

unpoedic

8:57 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



Upon stripping and replacing segments of code at a time, it seems the problem may be connected to my navigation: removed, the issue appears resolved.

Full code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >

<head>

<title> </title>

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<style type="text/css">
html, body {
background-color : #ccc;
margin : 0;
padding : 0;
}

/* layout */

#container {
width : 800px;
}
#footer {
background-color : blue;
clear : both;
height : 50px;
}
#header {
}
#main {
background-color : #fff;
display : inline;
float : right;
position : relative;
width : 570px;
}
#side {
background-color : #30332c;
float : left;
position : relative;
width : 230px;
}

[b] /* navigation */

.nav div {
text-align : center;
}
.nav li {
float : left;
text-align : center;
}
.nav ul {
list-style-type : none;
margin : 0;
padding : 0;
}
.nav01 {
background : url(nav01.jpg) no-repeat 0 0px;
border : 0;
float : left;
height : 72px;
text-align : center;
width : 60px;
}
a.nav01:link, a.nav01:visited, a.nav01:active {
background : url(nav01.jpg) no-repeat 0 0px;
text-decoration :none;
}
a.nav01:hover {
background : url(nav01.jpg) no-repeat -60px 0px;
}[/b]

/* text */

.container-txt {
color : #666;
font : 11px verdana;
padding : 50px 20px 10px 20px;
}
.footer-txt {
font : 9px verdana;
padding : 5px;
}
h1 {
color : #3d623d;
font : 23px times new roman;
padding : 0;
}
p {
border : 1px solid #444; /* border for testing purposes only */
}
</style>

</head>

<body>

<div id="container">

<div id="main">

<div id="header"><img alt="" src="collage.jpg" /></div>

<!-- php include here, eventually -->

[b]<div class="nav">
<ul>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
<li><a class="nav01" href="" title=""></a></li>
</ul>
</div>[/b]

<div class="container-txt">

<h1>Testing, testing, 1..2...83...</h1>

<p>wee bit of text here,<p>here,</p><p>and here.</p>

</div>

</div>

<div id="side">

<div><img alt="" src="quick-menu.jpg" /></div>

<div><img alt="" src="curve.jpg" /></div>

</div>

<div id="footer">

<div class="footer-txt">Hi, I'm the footer, nice t' meetcha.</div>

</div>

</div>

</body>
</html>

unpoedic

9:17 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



Not, of course, that it will suffice to do without the navigation.