Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Firefox Ie7 all work great Ie6 doesn't
Old 08-09-2007, 12:48 PM Firefox Ie7 all work great Ie6 doesn't
Skilled Talker

Posts: 89
Trades: 0
I have been making a website and I guess I asumed that since it wokred and looked good in Ie7 and in FF it would work well in IE6, but it doesn't. So far its only on a local host, but hear are some screenies.

IE6 http://i93.photobucket.com/albums/l7..._Bouzy/IE6.jpg

FF http://i93.photobucket.com/albums/l7...y_Bouzy/ff.jpg

Hear is my CSS
Code:
*{margin:0;padding:0;}
body {
background-color: #5f656b;
font-family: Tahoma, "Arial Unicode MS", Arial, sans-serif, serif;
font-size: .8em;
color: #eea103
}
 
/*July 8th 2007*/
 
#content {
height: 505px;
width: 518px;
background-image: url(images/content.jpg);
background-repeat: no-repeat;
margin-top: 4%;
margin-left: 27.2%;
}

#sidebar {
height: 505px;
width: 153px;
background-image: url(images/sidebar.jpg);
background-repeat: no-repeat;
margin-top: 4%;
padding-top: 3%;
padding-left: 3.5%;
margin-left: auto;
float: left;
}
#linkscss {
padding-left: .8%;
padding-right: .8%;
padding-top: 4%;
width: 105px;
}
 
#navigation {
margin: 0%;
padding-top: 0%;
border-width: 0px;
height: 28px;
}

#banner {
border-width: 0px;
margin: 0%;
padding: 0%;
margin-top: 0%;
height: 119px;
}

#footer {
height: 28px;
width: 712px;
background-image: url(images/footer.jpg);
background-repeat: no-repeat;
margin-top: 4.2%;
}
#container {
width: 712px;
margin: auto;
position: relative;
padding: 0%;
background-color: #3c4246;
}

#home {
width: 442px;
}
#news {
width: 442px;
}

#texto {
padding-left: .8%;
padding-top: 6%;
width: 105px;
}

#text {
padding-left: 5.5%;
padding-top: 5%;

}
#footer {
padding-top: .01%;
padding-left: 3%;
font-size: .7em;
}
 

#links {
padding: 0%;
margin: 0%;
}
#navigation {
height: 28px;
width: 712px;
background-image: url(images/navigation.jpg);
background-repeat: no-repeat;
margin-top: 0%;
}
#hvan {
margin-left: 28.5%;
padding-top: .7%;
padding-bottom: 1%;

}

h4.sidebar {
margin: 0px;
padding: 0px;
padding-top: 15%;
}

/*Should change form colors*/
#quotel {

}
.quote {
}

.name {
font-size: 14px;
background-color: #575b64;
border: 1px solid #eea103;
color: #eea103;
}
.budget {
font-size: 14px;
background-color: #575b64;
border: 1px solid #eea103;
color: #eea103;
}
.email {
font-size: 14px;
background-color: #575b64;
border: 1px solid #eea103;
color: #eea103;
}
textarea {
 background-color: #575b64;
 border: 1px solid #eea103;
 color: #eea103;
 
}
input {
 background-color: #575b64;
 border: 1px solid #eea103;
 color: #eea103
}
a:link {
color: #ef9f02;
}
a:visited {
color: #ef9f02;
}
a:hover {
color: #ae6d1b;
}
a:active {
color: #ef9f02;
}
table {
  margin-left: 0px;
  margin-right: 30px;
}
td, th {
padding: 0px;
margin: 0px;
}
tr {
padding: 20px;
}
 
 
.nav a {
color: #ef9f02;
text-decoration: none;
}
.nav a:visited {
color: #ef9f02;
text-decoration: none;
}
.nav a:hover {
color: #ae6d1b;
text-decoration: underline;
}

.nav a:active {
color: #ef9f02;
}
and an example padge of xhtml from one of my padges.

Code:
<?php
include('includes/corefuncs.php');
if (function_exists('nukeMagicQuotes')) {
  nukeMagicQuotes();
  }
  
/////////////////////////////////////////////////
//go ahead only if not suspect and all required fields OK
if (!$suspect && empty($missing)) {
 //set defaul values for variables that might not exist
 $quote = isset($quote) ? $subscribe : 'Nothing Selected';
}
///////////////////////////////////////////////////////////
$subject = 'Project Idea';
//list expected feilds
  $expected = array('name', 'email', 'comments', 'budget', 'quote');
//set required fields
  $required = array('name', 'comments', 'email');
//creat an empty array for any missing fields
$missing = array();
///////////////////////////////////////////////////////////
//process email
if (array_key_exists('send', $_POST)) {
  $to = 'goldfishgraphics@gmail.com'; //my email
  $subject = 'Project Idea';
 
  
//create empty array for any missing fields
$missing = array();
//assume that there is nothing suspect
$suspect = false;
//create a pattern to locate suspect phrases
$pattern = '/Content-Type:|Bcc:|Cc:/i';
//function to check for suspect phrases
function isSuspect($val, $pattern, &$suspect) {
 // if the variable is an array, loop through each element
 // and pass it recursively back to the same function
 if (is_array($val)) {
  foreach ($val as $item) {
   isSuspect($item, $pattern, $suspect);
  }
 }
 else {
  // if one of the suspect phrases is found, set Boolean to tur
  if (preg_match($pattern, $val)) {
   $suspect = true;
  }
 }
}
// check the $_POST array and any subarrays for suspect content
isSuspect($_POST, $pattern, $suspect);
if ($suspect) {
 $mailSent = false;
 unset($missing);
}
else {
//process the $_POST variables
foreach ($_POST as $key => $value) {
 //asign to temporary variable and strip whitespace if not an array
$temp = is_array($value) ? $value : trim($value);
 //if empty and required, add to $missing array
 if (empty($temp) && in_array($key, $required)) {
  array_push($missing, $key);
 }
 //otherwise, assign to a variable of the same name as $key
 elseif (in_array($key, $expected)) {
  ${$key} = $temp;
 }
}
}
//build the message
//go ahead if required feilds are in
if (!$suspect && empty($missing)) {
//build message
  $message = "Name: $name\n\n";
  $message .= "Email: $email\n\n";
  $message = "Budget: $budget\n\n";
  $message = "Quote: $quote\n\n";
  $message .= "Comments: $comments";
  
//limit line length to 65 characters
  $message = wordwrap($message, 65);
// send it
$mailSent = mail($to, $subject, $message);
if ($mailsent) {
  //missing is no longer needed if the meail is sent, so unset it
  unset($missing);
 }
     }
    }
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Goldfish Graphics</title>
<link type="text/css" rel="stylesheet" href="Goldfish.css" />
<style type="text/css">
<!--
A {text-decoration:none}
-->
</style>
</head>
<body>
<div id="container">
<div id="banner">
<img src="images/banner.jpg" alt= "Goldfish Graphics Banner Image" />
</div>

<div id="navigation">
<div id="hvan">
<a href="index.php">Home</a> &nbsp; &nbsp; &nbsp; &nbsp;  <a href="services.php">Services</a> &nbsp; &nbsp; &nbsp; &nbsp;  <a href="portfolio.php">Portfolio</a> &nbsp; &nbsp; &nbsp; &nbsp; <a href="contact.php">Contact</a>
</div>
</div>

<div id="sidebar">
<div id="texto">
<h4 class="sidebar"> Testimonies</h4>
<p>
<?php include('testmonies.php'); ?>
</p>
</div>
<h4>Links</h4>
<div id="links">
<div class="nav"> 
<p>
<?php
@include('includes/links.html');
?>
</p>
</div>

</div>
</div>
 
<div id="content">
<div id="text">
<h2>Contact</h2>
<div id="formdiv">

<form id="feedback" method="post" action="">
  
<table>
<tr>
<td>
 <label for="name">Name:</label>
 <input name="name" id="name" type="text" class="formbox"
 <?php if (isset($missing)) {
   echo 'value="'.htmlentities($_POST['name']).'"';
 } ?>/> *
 
&nbsp; &nbsp;
 <label for="budget">Budget:</label>
 <input name="budget" id="budget" type="text" class="formbox"
 <?php if (isset($missing)) {
   echo 'value="'.htmlentities($_POST['budget']).'"';
 } ?>/>
 
</td> 
  </tr> 
    
  <tr>
  <td>
<br />
   <label for="email">Email:</label>
 <input name="email" id="email" type="text" class="formbox"
 <?php if (isset($missing)) {
   echo 'value="'.htmlentities($_POST['email']).'"';
 } ?>/> *
 
&nbsp;  &nbsp;&nbsp;
  Free quote?
  <input name="quote" type="radio" value="Yes" id="Free Quote"
  <?php
  $OK = isset($_POST['quote']) ? true : false;
  if ($OK && isset($missing) && $_POST['quote'] == 'Yes') { ?>
   checked="checked"
  <?php } ?>
  />
  <label for="quote-yes">Yes</label>
  <input name="quote" type="radio" value="No" id="subscribe-no"
  <?php
  if ($OK && isset($missing) && $_POST['quote'] == 'No') { ?>
   checked="checked"
  <?php } ?>
  />
  
  <label for="quote-no">No</label>
  
  </td>
</tr>

  <tr>
  <td>
<br />
 <label for="comments">Prodject Description: *</label>
 <textarea name="comments" id="comments" cols="54" rows="5"><?php 
 if (isset($missing)) {
  echo htmlentities($_POST['comments']);
 } ?></textarea> 
 </td>
 <td>
 </td>
  </tr>

  <tr>
  <td>
 <input name="send" id="send" type="submit" value="Submit" />
  </td>
  <td>
  </td>
  </tr>
  
  </table>
</form>
</div>

<?php
if ($_POST && isset($missing)) {
?>
  <p class="warning">Please complete all required missing item(s).</p>
<?php
 }
elseif ($_POST && !$mailSent) {
?>
  <p class="warning">Sorry, there was a problem sending your message. Please try later.</p>
<?php
 }
elseif ($_POST && $mailSent) {
?>
  <p><strong>Your message has been sent. Thank you.
</strong></p>
<?php }?>
</p>
<p id="news">
If you have questions, comments, or troubles with the form above, you can also contact me at goldfishgraphics@gmail.com.
</p>
</div>
</div>
<div id="footer">
</div>
 
</div>

</body>
</html>
Bouzy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-09-2007, 01:53 PM Re: Firefox Ie7 all work great Ie6 doesn't
Average Talker

Posts: 18
Name: Chris
Trades: 0
You will need to use IE6 conditional statements along with specific IE hacks to sort out this problem

You've worked the right way around though... Firefox first then IE
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
cmjphp is offline
Reply With Quote
View Public Profile
 
Old 08-09-2007, 03:21 PM Re: Firefox Ie7 all work great Ie6 doesn't
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
What you're seeing is called float drop - and IE does it because the widths of the elements inside the container are too wide to fit inside the container - at least by IE6 calculations - and it's broke-to-hades box model.

http://www.communitymx.com/content/a...989953B6F20B41
http://www.positioniseverything.net/explorer.html

As Chris mentioned, using conditional comments to target IE6's bad behavior will be needed.

You'll need to mess around with the margins and/or padding on the boxes to reduce the spacing between the #sidebar and the #content.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-11-2007, 12:38 AM Re: Firefox Ie7 all work great Ie6 doesn't
Skilled Talker

Posts: 89
Trades: 0
So I read through both of those links. I still don't get it and I also googled it. Are conditional statments hard? Do I have to learn another language or is it just really easy. I don't really get it. Could you post an example or help explain more what they are. That would be great if someone could.
Bouzy is offline
Reply With Quote
View Public Profile
 
Old 08-11-2007, 11:57 AM Re: Firefox Ie7 all work great Ie6 doesn't
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
Are conditional statments hard?
No, they're easy and you don't need to learn any new language.
Here's the CC's I use:

Quote:
<!--[if lt IE 7]>
<link href="iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<!--[if gt IE 6]>
<link href="ie7fixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
I told you what you need to do..
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-11-2007, 12:37 PM Re: Firefox Ie7 all work great Ie6 doesn't
Skilled Talker

Posts: 89
Trades: 0
Thanks it works and i understand it.
Bouzy is offline
Reply With Quote
View Public Profile
 
Old 08-12-2007, 08:56 PM Re: Firefox Ie7 all work great Ie6 doesn't
Skilled Talker

Posts: 89
Trades: 0
It still doesn't work. I have that in my code, but when I load my page in IE6 nothing changes even though I did it correctly from what I can tell. What does teh lt and gt in it mean? Does that make a difference? Am I going about this wrong?

<!--[if lt IE 7]>
<link href="iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<!--[if gt IE 6]>
<link href="ie7fixes.css" rel="stylesheet" type="text/css" /> <![endif]-->


My other question is does this mistake make me a lazy coder or something? Should I have done something different I mean how do huge sites get around this?
Bouzy is offline
Reply With Quote
View Public Profile
 
Old 08-12-2007, 11:03 PM Re: Firefox Ie7 all work great Ie6 doesn't
Skilled Talker

Posts: 89
Trades: 0
Never mind. I just realized that you have to put that below the other CSS file links. However there is still the problem of fixing it. Do you know what is making that space to the right of my layout?
Bouzy is offline
Reply With Quote
View Public Profile
 
Old 08-13-2007, 03:32 PM Re: Firefox Ie7 all work great Ie6 doesn't
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
if lt IE 7 = If less than IE 7 - meaning any version older than 7

if gt IE 6 = any version of IE greater than 6

Do you have a separate CSS file that contains ONLY the IE 'hacks' you need to make IE behave ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Firefox Ie7 all work great Ie6 doesn't
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44329 seconds with 12 queries