Firefox and IE web design problems
Page 1 of 1
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 11:47    Post subject: Firefox and IE web design problems
I thought my website was done and finished untill I opened it in IE... Everything is how I want it in Firefox etc but in IE im having problems with my PHP page and my XML page.

Its like IE isnt reading the CSS properly, Everything is either all the way over to the left (that is set to float:left;) or all the way over to the right (that is set to float:right;) Its suposed to be sitting central eg -

Code:


this is what it should be like and what its like in Firefox (| = edge of browser and @ = site content) -

|  @  |


This is how IE shows it but only on the PHP and XML pages -

|@   |

or

|   @|



The HTML pages work 100% fine in IE.

Does IE have a problem reading CSS on PHP pages and XML / XSL pages? Its reading all the images etc from the CSS fine its just not lining it up....

Thanks


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Fri, 13th Apr 2012 12:31    Post subject:
How are you positioning things and which version of IE? Need some code to be able to tell you anything Smile

IE 6, 7, 8 and 9 all render differently. As does FF 3.6 vs 4.0+, Safari vs. Chrome and Chrome (some OS) vs. Chrome (another OS) at times.
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Fri, 13th Apr 2012 12:32    Post subject:
Which version of IE are we talking about. And do you test on a local setup webserver, a server on the internet, or just local filesystem?


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 12:50    Post subject:
Im using Quick PHP web server to test it out.

I will fire my code up, do you just need the CSS ?

Code:

   body {
   height: 100%;
   background-image: url(images/back.jpg);
   background-repeat: repeat;
   width: 800px;
   height: 600px;
   margin-left: auto;
   margin-right: auto;
   font-family:Calibri;
   font-size:14pt;
   padding-top:5px;
          } 

   #logo {
      position:static;
   background-image: url(images/Logo.jpg);
   width: 730px;
   height: 120px;
   margin-left: 35px;
   background-repeat:no-repeat;
   margin-top:5px;
         }
   

#welcome {
   position: relative;
   float: left;
   margin-top: 5px;
   margin-left: 0px;
   width: 400px;
   height: auto;
   background-color: white;
   font-family: Calibri;
   font-size: 14pt;
   color: black;
   padding:5px;
   z-index:-1;
      }

#ad1 {
position:static;
   margin-right:35px;
   float:right;
   margin-top:5px;
   background-image: url(images/ad1.jpg);
   width: 300px;
   height: 240px;
   border:thin solid black;
   
   }
   
#ad2 {

   float:left
   background-image: url(images/add2.jpg);
   margin-top: 15px;
   margin-left: 430px;
   width: 300px;
   height: 120px;
   background-color: black;
   border:thin solid black;
   }
   
#footer {
   margin-top: -35px; /* negative value of footer height */
   height: 35px;
   width: 700px;
   clear:both;
   margin-left:35px;
   background-color: white;
   text-align:center;
   border-top:thin solid black;
      font-family: Calibri;
   font-size: 12pt;
   color: black;
   }


Thats the CSS Im using in my PHP Page. Works fine for Firefox

testing with latest IE

thanks


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Fri, 13th Apr 2012 12:53    Post subject:
we need the markup too. Actually it would be nice if you could just post a link so that we can take a look. I don't know what quick php is though. Does it feature a webserver? Why not go for something well known like xampp Very Happy


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 13:03    Post subject:
its not actually hosted yet, its a college project / assignment and the first time I have properly built a website from sort of scratch. Heres the PHP code if thats what you mean? -

Code:
<link href="contact.css" rel="stylesheet" type="text/css" />


<ul id="logo">
</ul>

<?php
if(isset($_POST['email'])) {
     
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "steve.xxx@gmail.com";
    $email_subject = "Cumbria Vehicles";
     
     
    function died($error) {
        ?>
 
<div class="error" style=" max-width:400px; background-color:white; margin-left:35px; font-family:Calibri; font-size:14pt; text-align:center; float:left; padding-top:10px; position:relative; max-height:auto; padding-bottom:10px;">
       <p><h2>Error</h2></p>
        <p>Sorry, but there were error(s) found with the form you submitted - </p>
        </div>
       
        <br />

                  <img src="images/ad1.jpg" style="position:static;
   margin-right:35px;
 
   float:right;
   margin-top:5px;
   width: 300px;
   height: 240px;
   border:thin solid black;" /></p>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


 
        <?php
        echo $error."";
      ?>
        <br />
<div class="error2" style="background-color:white; margin-left:35px; font-family:Calibri; font-size:14pt; text-align:center; float:left; padding-top:0px; margin-top:0px; max-width:400px; position:relative; max-height:auto; padding-bottom:50px; ">
         Please click <A HREF="previous.html" onClick="history.back();return false;">here</A> or back on your browser to return to the previous page and correct the errors.
 
  </div> 

 
<img src="images/add2.jpg" style="position:static;
   float:right;
   margin-bottom:25px;
   margin-right:35px;
   width: 300px;
   height: 120px;
   background-color: black;
   border:thin solid black;
    z-index:1;" /></p>
   
<p>&nbsp;</p>


<div id="footer">
  <p>Copyright Steven xxx 2012. All Rights Reserved. </p>
</div>
 
  <?php

 

die();
    }
     
    // validation expected data exists
    if(!isset($_POST['first_name']) ||
        !isset($_POST['last_name']) ||
        !isset($_POST['email']) ||
        !isset($_POST['telephone']) ||
        !isset($_POST['comments'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');     
    }
     
    $first_name = $_POST['first_name']; // required
    $last_name = $_POST['last_name']; // required
    $email_from = $_POST['email']; // required
    $telephone = $_POST['telephone']; // not required
    $comments = $_POST['comments']; // required
     
    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  if(!preg_match($email_exp,$email_from)) {
    $error_message .= '- The Email Address you entered does not appear to be valid.<br />';
  }
    $string_exp = "/^[A-Za-z .'-]+$/";
  if(!preg_match($string_exp,$first_name)) {
    $error_message .= '- The First Name you entered does not appear to be valid.<br />';
  }
  if(!preg_match($string_exp,$last_name)) {
    $error_message .= '- The Last Name you entered does not appear to be valid.<br />';
  }
  if(strlen($comments) < 2) {
    $error_message .= '- The Comments you entered do not appear to be valid.<br />';
  }
  if(strlen($error_message) > 0) {
    died($error_message);
  }
    $email_message = "Form details below.\n\n";
     
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
     
    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Last Name: ".clean_string($last_name)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";
    $email_message .= "Telephone: ".clean_string($telephone)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
     
     
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
 
 
<div class="thanks" style="background-color:white; margin-left:35px; font-family:Calibri; font-size:14pt; text-align:center; float:left; padding-top:50px; max-width:400px; position:relative; max-height:auto; padding-bottom:10px;">
  <p><h2>Success</h2></p>
  <p>Thank you for contacting Cumbria Vehicles. Your message has been passed onto one of our operators.    </p>
  <p>&nbsp;</p>
  <p>You will be redirected to the homepage automatically or please click <a href="home.html">here</a> </p>
  <meta http-equiv="refresh" content="8; url=home.html">
</div>
 


 

  <?php
}
?>

<br />
 
<img src="images/ad1.jpg" style="position:static;
   margin-right:35px;
   float:right;
   margin-top:5px;
   width: 300px;
   height: 240px;
   border:thin solid black;" /></p>
   
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

 
  <br />
  <br />
 
 
<img src="images/add2.jpg" style="position:static;
   float:right;
   margin-top: 0px;
   margin-right:35px;
   width: 300px;
   height: 120px;
   background-color: black;
   border:thin solid black;" /></p>
   

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
<p>&nbsp;</p>

<div id="footer">
  <p>Copyright Steve 2012. All Rights Reserved. </p>
</div>



as said it works fine in FF.
p


George W Bush -

'...more and more of our imports are coming from overseas.'


Last edited by Steve-O 2004 on Fri, 13th Apr 2012 13:28; edited 1 time in total
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 13:08    Post subject:
my code is probably a complete mess, it was 3:30am when I was doing it lol


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Fri, 13th Apr 2012 13:23    Post subject:
I removed your surname Wink And I'll take a look later if thats ok, just have to eat something first Laughing


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 13:29    Post subject:
PumpAction wrote:
I removed your surname Wink And I'll take a look later if thats ok, just have to eat something first Laughing


lol thanks, Ive just removed it from the footer as well Wink


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 15:25    Post subject:
oh and if needed the HTML section that links to the PHP page when "Submit" is pressed -

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">
<head>
<title>Untitled Document</title>
<link href="cssbarebones.css" rel="stylesheet" type="text/css" />
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<body>


<ul id="logo">
</ul>

<ul id="menu">

   <li><a href="home.html" title="Home page">Home</a></li>
   <li><a href="cars.xml" title="Cars">Cars</a></li>
   <li><a href="bikes.xml" title="Bikes">Bikes</a></li>
   <li><a href="links.html" title="Links page">Links</a></li>
   <li><a href="about.html" title="About page">About us</a></li>
       <li><a href="contact.html" title="Contact us page">Contact us</a></li>
       </ul>

<div class="box" id="h1" style="position:absolute; top:0px; right:0px;">
 
  <p>Cumbria Vehicles</p>
</div>

<div id="sub">
Contact us
</div>

<div id="textbox">
Please use form below to contact us. </div>

<form name="contactform" method="post" action="send_form_email.php">
<table width="400px" style="float:left; margin-left:35px; background-color:#FFF">
<tr>
 <td valign="top">
  <label for="first_name">First Name *</label>
 </td>
 <td valign="top">
  <input  type="text" name="first_name" maxlength="50" size="30">
 </td>
</tr>
<tr>
 <td valign="top"">
  <label for="last_name">Last Name *</label>
 </td>
 <td valign="top">
  <input  type="text" name="last_name" maxlength="50" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="email">Email Address *</label>
 </td>
 <td valign="top">
  <input  type="text" name="email" maxlength="80" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="telephone">Telephone Number</label>
 </td>
 <td valign="top">
  <input  type="text" name="telephone" maxlength="30" size="30">
 </td>
</tr>
<tr>
 <td valign="top">
  <label for="comments">Comments *</label>
 </td>
 <td valign="top">
  <textarea  name="comments" maxlength="1000" cols="25" rows="6"></textarea>
 </td>
</tr>
<tr>
 <td colspan="2" style="text-align:center">
  <input type="submit" value="Submit">   <a href="http://www.freecontactform.com/email_form.php">Email Form</a>
 </td>
</tr>
</table>
</form>

<br />
<br />
<br />
<br />


<div id="ad1">  </div>
<div id="ad2"> </div>

<br />
<br />
<br />
<br />


<div id="footer">
  Copyright Steve 2012. All Rights Reserved.
 
</div>

</body>
</html>



George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
Interinactive
VIP Member



Posts: 29151

PostPosted: Fri, 13th Apr 2012 15:37    Post subject:
⁢⁢


Last edited by Interinactive on Tue, 5th Oct 2021 04:21; edited 1 time in total
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 18:00    Post subject:
well the PHP Contact page was a free to use one that I adapted for my site.

Its my first time at HTML, XML, XSL, PHP and CSS so Im not too bothered about the mess lol just as long as it works Very Happy


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
garus
VIP Member



Posts: 34200

PostPosted: Fri, 13th Apr 2012 19:39    Post subject:
snip


Last edited by garus on Tue, 27th Aug 2024 21:26; edited 1 time in total
Back to top
Steve-O 2004




Posts: 2851

PostPosted: Fri, 13th Apr 2012 21:22    Post subject:
garus wrote:
Steve-O 2004 wrote:
PumpAction wrote:
I removed your surname Wink And I'll take a look later if thats ok, just have to eat something first Laughing


lol thanks, Ive just removed it from the footer as well Wink


Too late! You are getting Christmas cards from me forever! Very Happy


Excellent, I can pretend I have a friend Very Happy Very Happy


George W Bush -

'...more and more of our imports are coming from overseas.'
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group