Welcome to WebmasterWorld Guest from 54.145.144.101

Forum Moderators: not2easy

Message Too Old, No Replies

CSS does not work in Firefox

the bane of my life

   
2:11 pm on Feb 7, 2008 (gmt 0)

5+ Year Member


Can someone tell me why firefox sees it necessary to inturpret the following simple CSS wrongly?

im using absolute positioning to layout a site (as another method FF didn't like either)
----------------------
css codes:

#top_home{
position:absolute;
top: 11px;
left: 5px;
padding:0px;
}

#mid_home{
position:absolute;
top: 40px;
left: 5px;
padding:0px;
}

.homemidleft{
background-image:url(images/left.gif);
background-repeat:none;
width:446;
height:429;
margin:0px;
float:left;
}

.homemidright{
background-image:url(images/right.gif);
background-repeat:none;
width:333px;
height:429;
margin:0px;
float:left;
}

----------------------------
html

<div id="top_home">
some stuff in here
</div>
<!-- End Top -->

<div style="clear:both; "></div>
<!-- middle -->
<div id="mid_home">
<div class="homemidleft">
<p>test</p>
</div>
<div class="homemidright">
<p>test</p>
</div>
<div style="clear:both; "></div>
</div>
<!-- End middle -->

some footer etc here
--------------------------------------

will greatly appreciate any help you can give

11:11 am on Feb 8, 2008 (gmt 0)

5+ Year Member



jk111,

Firefox is not interpreting that CSS wrongly.

'none' is not a valid value for 'background-repeat', the animal you are after is 'no-repeat' and just because MSIE looks at the first two letters of your value and gives you what you want doesn't make MSIE clever.

Width and height properties are invalid if a unit indicator is not given except for value '0'. Firefox won't take a guess at values if they are not valid, it just drops (ignores) them.

Here are a pair of beauties anybody writing this sort of stuff should try the "I'm feeling lucky" button with at Google.

w3c html validator
w3c css validator

Good luck,
robsoles

 

Featured Threads

Hot Threads This Week

Hot Threads This Month