Jump to content

Why Firefox shows it wrong?

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Why Firefox shows it wrong? Rate Topic: -----

#1 User is offline   ZekeLL 

  • W.R. Private
  • Group: Members
  • Posts: 4
  • Joined: 20-July 08

Posted 22 September 2008 - 05:28 PM

Hi, why Firefox shows it wrong and IE right? The website is www.theoutsourcingcompany.com

If I change the value of margin-top to zero for the divs div-logo and div-text it looks good on both browsers but there's too much white space on top of the logo and the text...

I am very frustrated, please help me.

Here's the code for the HTML:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Outsourcing Company - Web design, copywriting, programming. | Outsourcing Services</title>
<link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
	text-align: center;
	margin: 0;
	background-color: #9e0b0f;
	background-image: url(images/back.jpg);
	background-repeat: repeat-x;
}
</style>

</head>

<body>
<div class="div-header"></div>
<div class="div-middle">
<div class="div-logo">

	<p><img src="images/logo.jpg" alt="The Outsourcing Company" width="193" height="55" /></p>
	<p><span class="div-menu"><img src="images/home.jpg" alt="Home" width="96" height="26" /><br />
		<img src="images/about-us.jpg" alt="About Us" width="96" height="26" /><br />
		<img src="images/ourservices.jpg" alt="Our Services" width="96" height="26" /><br />
		<img src="images/contactus.jpg" alt="Contact Us" width="96" height="26" /></span></p>
  </div>
  <div class="div-text">
	<p>The Outsourcing Company is your business partner for:</p>

	<p><img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Software Development<br />
	  <img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Content Generation / Article Writing<br />
	  <img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Internet Marketing<br />
	  <img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Search Engine Optimization (SEO)<br />
	  <img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Pay-Per-Click (PPC) Campaigns Management<br />

	<img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Professional Copywriting Services</p>
	<p>We have two goals:</p>
	<p><img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Help you make more money by increasing your revenues<br />
	  <img src="images/bullet.jpg" alt="Bullet" width="12" height="24" /> Help you save money by optimizing your costs and processes</p>
  </div>

</div>
<div class="div-footer"></div>
</body>
</html>



And this is the CSS:

.div-header {
	background-image: url(images/header-blank.jpg);
	background-repeat: no-repeat;
	margin: auto;
	height: 164px;
	width: 800px;
}
.div-footer {
	background-image: url(images/footer.jpg);
	background-repeat: no-repeat;
	margin: auto;
	height: 48px;
	width: 800px;
}
.div-logo {
	height: 55px;
	width: 193px;
	margin-left: 40px;
	text-align: right;
	float: left;
	margin-top: -120px;
}
.div-text {
	float: left;
	text-align: left;
	width: 485px;
	padding-left: 30px;
	font-family: "Myriad Pro";
	font-size: 13px;
	margin-top: -108px;
}
.div-middle {
	background-image: url(images/middle.jpg);
	background-repeat: repeat-y;
	margin: auto;
	width: 800px;
	height: 1000px;
}

0

#2 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

Posted 22 September 2008 - 07:36 PM

Because your floating two divs left. If you want them to be one after the other you either need to just put them both in 1 div (that would be the smartest thing to do as your using the same styling rules for floating it left)
Or use clear: left on the bottom div.

If you want it to look like it does in IE, float the text div right instead. (this will then create a two column layout as seen here http://www.webradiance.com/Web-Design-Foru...yout/t2570.html )

Its not that firefox isnt showing it right and IE is, its just that IE handles your messy code :P

P.S. I also noticed your width on 800px. Becuase you specificed it at that amount it wont quite fit on 800x600 browser. Make it about 20px less and should fit okay. (browser makes space for the right content bar)
sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

#3 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 23 September 2008 - 05:02 AM

Just a tip from a seasoned browser warrior: If something looks right in IE and wrong in Firefox, your code is bad. Always make your site look correct in Firefox first, then tweak your code here and there to make it look decent in IE.
0

#4 User is offline   Barnard 

  • W.R. Private
  • Group: Members
  • Posts: 8
  • Joined: 28-January 09

Posted 30 April 2009 - 03:27 AM

hi ZekeLL,
you've got a messed-up site there. For a start, a site that works in IE but not others is a bad proposition. Get your site working in OTHER browsers first, as IE has big problems. I think you really need to get down to the basics of CSS before going ahead with this. At the moment your links are sitting over (or under) the text. Perhaps post a screenshot of what you'd like the page to look like and we could suggest a proper layout structure.
0

#5 User is offline   zhoom 

  • W.R. Private
  • Group: Members
  • Posts: 4
  • Joined: 09-July 10

Posted 30 November 2010 - 08:13 PM

Your problem is one of the reasons why it is important to validate your codes. When you are coding websites always make sure that you validate it to eliminate errors.
0

#6 User is offline   che09 

  • W.R. Corporal
  • Group: Members
  • Posts: 50
  • Joined: 22-November 10

Posted 05 December 2010 - 08:33 PM

View Postzhoom, on 30 November 2010 - 08:13 PM, said:

Your problem is one of the reasons why it is important to validate your codes. When you are coding websites always make sure that you validate it to eliminate errors.


Well said! Validating your code will make errors less!!
0

#7 User is offline   denny 

  • W.R. Private
  • Group: Members
  • Posts: 29
  • Joined: 31-March 10

Posted 22 December 2010 - 01:16 AM

Validate your code to avoid the errors.
0

#8 User is offline   EncoderDecoder 

  • W.R. Sergeant
  • Group: Members
  • Posts: 260
  • Joined: 01-March 11
  • Gender:Female
  • Location:Philippines

Posted 26 May 2011 - 07:28 AM

View Postmarcamos, on 23 September 2008 - 05:02 AM, said:

Just a tip from a seasoned browser warrior: If something looks right in IE and wrong in Firefox, your code is bad. Always make your site look correct in Firefox first, then tweak your code here and there to make it look decent in IE.



waah, nice tip..! thanks..!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users