Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2005, 03:52 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default The Mozilla & IE Problem

This has long been puzzleing me, but is there any way to format webpages so they look the same in mozilla firefox as they do in IE, here are my 2 examples

IE http://tinyurl.com/9zaks
Mozilla http://tinyurl.com/ddw7k

as you can see the line spaceings in IE are alot bigger, so it cuts of the rest of the page.

cheers for any help.
 
Old December 1st, 2005, 06:59 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Impossible to tell from a screen shot.

Can you post your code?

Cheers,

Chris

 
Old December 1st, 2005, 08:16 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

when i was attempting to do this i noticed the use of CSS helped

www.crmpicco.co.uk
 
Old December 1st, 2005, 05:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You mean like this?
http://foo.yupapa.com/wrox/ie.gif

--
http://yupapa.com
 
Old December 3rd, 2005, 09:49 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dont realy know CSS, and a bit of screen shot editing dosent realy help meow but yes thats how i want it to look in IE, but it dosent because it seems like IE uses diffrent mesurments for <p></p> than mozilla

this is the code, ive validated it at w3.org so its all fine in that respect


html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>USA Show Air Dates</title>
<style type="text/css">
<!--
.style1 {
    font-family: Tahoma;
    font-size: 12px;
    color: #666666;
}
.style3 {
    color: #000000;
    font-weight: bold;
}
.style5 {font-family: Tahoma; font-size: 12px; color: #000000; }
-->
</style>
</head>

<body>
<table width="100%" border="0" align="center">
  <tr>
    <td width="100%" bgcolor="#6C8AFF"><div align="center"><span class="style5">Search term: <strong>stargate</strong></span></div></td>

  </tr>
</table>
<p align="left" class="style1">Show: <span class="style3">Stargate SG-1
</span></p>
<p align="left" class="style1">First Aird: <span class="style3">1997
</span></p>
<p align="left" class="style1">Last Episode: <span class="style3">09x10, "The Fourth Horseman (1)" aird on 16/Sep/2005
</span></p>
<p align="left" class="style1">Next Episode: <span class="style3">09x11, "The Fourth Horseman (2)" airing on 13/Jan/2006
</span></p>
<div align="right">
  <input name="Close" type="button" onClick="javascript:window.close()" value="Close">

</div>
<table width="100%" border="0" align="center">
  <tr>
    <td width="100%" bgcolor="#6C8AFF" class="style5"><div align="center">End</div></td>
  </tr>
</table>
</body>
</html>
 
Old December 6th, 2005, 05:17 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

did some looking into CSS, and yea your right, can set the paragraph spaceings and stuff

easyest way would just be to put the lines into a table

 
Old December 6th, 2005, 05:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:a bit of screen shot editing dosent realy help meow
My point exactly. :D
Sorry, but I was joking because you posted a screen cap instead of a URL. ;)

You don't need another table. You don't even need the first one. Control the margins. If I remember right from your screen shot you had disabled resizing of the pop-up. That is a bigger problem. Because the window will be too small for the text if the user increases the text size and then they can't read all of the text.

--
http://yupapa.com
 
Old January 3rd, 2006, 09:54 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

have you tried using !important in your css.

example:
/*css style*/
border: 1px solid ThreeDShadow !important;/*only firefox will read this */

__________________________________________________ ________
This is my junk I'm gona eat it
 
Old January 19th, 2006, 09:30 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try defining the margins etc in a general CSS rule for paragraphs, along these lines:

p {
margin-top: 10px;
margin-bottom: 10px;
padding: 5px;
line-height: 1.6em;
}

I don't know for sure if it will iron out the differences, but it is what I would try in the same situ.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with using AJAX in Mozilla vinay.sindri XML 2 January 25th, 2008 10:30 AM
ASP.NET controls & Mozilla: Rendering Problems hgberman ASP.NET 1.0 and 1.1 Basics 6 February 3rd, 2006 06:41 PM
Javascript && keeps turnig into &amp;&amp; ayrton Pro VB.NET 2002/2003 3 June 27th, 2005 03:34 PM
Linux & KDE & C++ & QT & MYSQL & Kdevelop Munnnki Linux 0 January 2nd, 2005 05:41 PM
alignment problem in IE and Mozilla rpalanivelu Javascript 2 November 17th, 2003 08:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.