homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
CSS does not work in Firefox
the bane of my life
jk111

5+ Year Member



 
Msg#: 3568523 posted 2:11 pm on Feb 7, 2008 (gmt 0)
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

 

robsoles

5+ Year Member



 
Msg#: 3568523 posted 11:11 am on Feb 8, 2008 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved