This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Problem with CSS in page I have written [SOLVED]

  • 1 (رد واحد)
  • 1 has this problem
  • 1 view
  • آخر ردّ كتبه Ravendark

more options

There is a php page I have created at work which works fine with Firefox 3.6. In one specific page Firefox 4 does not show correctly a table with CSS. I tried to remove the css and just have the table with no styling but the problem persists.

the php file is this:

<html>
<head>
<title>Pending Issues Close Case</title>

<style type="text/css">
#blinking {text-decoration: blink; text-align:left; color:#FF0000;}

body {
background-image:url('on2.jpg');
background-repeat:no-repeat;
background-position:700 50;
background-attachment:fixed;
}

#efms
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse:collapse;
}
#efms td, #efms th 
{
font-size:1em;
border:1px solid #98bf21;
padding:3px 7px 2px 7px;
}
#efms th 
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
#efms tr.alt td 
{
color:#000000;
background-color:#EAF2D3;
}

</style>


<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
<script type="text/javascript">
	window.onload = function(){
		new JsDatePick({
			useMode:2,
			target:"date_of_problem",
			dateFormat:"%Y-%m-%d"
		});
		
		new JsDatePick({
			useMode:2,
			target:"closed_date",
			dateFormat:"%Y-%m-%d"
		});
	};
	
	
	
	
	function checkEmpty() {
		var date_of_problem = document.save_entries.date_of_problem.value;
		var hour_of_problem = document.save_entries.hour_of_problem.value;
		var min_of_problem = document.save_entries.min_of_problem.value;
		
		var reported_to = document.save_entries.reported_to.value;
		var problem_description = document.save_entries.problem_description.value;
		var close = document.save_entries.close.value;
		
		var closed_date = document.save_entries.closed_date.value;
		var closed_hour = document.save_entries.closed_hour.value;
		var closed_min = document.save_entries.closed_min.value;
		
		var ok = "true";
		var why = "";
		var ok2 = "true";
		var tmp1 = date_of_problem.split("-");
		var date1 = new Date(tmp1[0], tmp1[1], tmp1[2], hour_of_problem, min_of_problem);
		var tmp2 = closed_date.split("-");
		var date2 = new Date(tmp2[0], tmp2[1], tmp2[2], closed_hour, closed_min);
		
		if (date_of_problem.length == 0) {
			ok = "false";
			why += "Date of problem is empty\n";
		}
		if (reported_to.length == 0) {
			ok = "false";
			why += "Reported to is empty\n";
		}
		if (problem_description.length == 0) {
			ok = "false";
			why += "Problem description is empty\n";
		}
		if (closed_date.length == 0 && close == "Yes") {
			ok = "false";
			why += "Closed date is empty\n";
		}
		if (date2 < date1) {
			ok = "false";
			why +="Closed date cannot be earlier than problem date\n";
		}
		
		
		if (ok == "true") {
			return true;
		}
		else {
			alert(why);
			return false;
		}
	}

</script>
</head>
<body>
<?php

session_start();
if (!isset($_SESSION['pending_user'])){
	header("location:main_login.php");
}

if ($_GET['entry'] == "" || $_GET['entry'] == NULL)
	header("location:view_entries.php");



$id = $_GET['entry'];

function get_entry($id) {
	$mysql_host = "localhost";
	$mysql_user = "portal";
	$mysql_pass = "portal";
	$db_name = "pending_issues";
	$entries_table = "entries";
		
	mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass") or die("cannot connect to DB" . mysql_error());
	mysql_select_db("$db_name")or die("cannot select DB" . mysql_error());
	mysql_query("set names 'utf8'")or die("fook!" . mysql_error());
	$entry_query = "SELECT * FROM $entries_table WHERE id='$id'";
		
	$entry_data = mysql_query($entry_query) or die("Cannot execute query");
		
	$entry_row = mysql_fetch_array($entry_data) or die("Cannot fetch row");
	
	
	///////////////////////////
	
	
	
	$date_of_problem = $entry_row['date_of_problem'];	
	$time_of_problem = $entry_row['time_of_problem'];
	$hour_of_problem = strtok($time_of_problem, ":");
	$min_of_problem = strtok(":");
	
	$resp_technician =$entry_row['resp_technician'];
	
	
	
	$reported_to = $entry_row['reported_to'];
	$description = $entry_row['problem_description'];
	$closed_date = $entry_row['closed_date'];
	$closed_time = $entry_row['closed_time'];
	$closed_hour = strtok($closed_time, ":");
	$closed_min = strtok(":");
	$closed_by = $_SESSION['pending_user'];
	
	
	echo '<h2><font color="#A7C942">Welcome, ' . $_SESSION['pending_user'] . '</font></h2>';
	echo '<table id="efms">';
	echo '<tr class="alt">';
	echo '<td>';
	echo '<br><a href=index.php>Home</a><br><br>';
	echo '</td>';
	echo '<td>';
	echo '<br><a href=view_entries.php>View entries</a><br><br>';
	echo '</td>';
	echo '<td>';
	echo '<a align="center" href="logout.php">Log out</a><br>';
	echo '</td>';
	echo '</tr>';
	echo '</table>';
	echo '<br>';
	
	echo '<form name="save_entries" action="save_entries.php" method="post" onSubmit="return checkEmpty();"';
	echo '<table id="efms">';
	echo '<tr>';
	echo '<th>';
	echo 'Problem date';
	echo '</th>';
	echo '<td>';
	echo '<input id="date_of_problem" name="date_of_problem" type="text" value="' . $date_of_problem . '">';
	echo '<input type="hidden" name="entry" value="' . $id . '">';
	echo '</td>';
	echo '</tr>';
	
	echo '<tr>';
	echo '<th>';
	echo 'Problem time';
	echo '</th>';
	echo '<td>';
	//echo '<input name="time\_of\_problem" type="text" value="' . $time_of_problem . '">';
	echo_hour($hour_of_problem, "hour_of_problem");
	echo ":";
	echo_min($min_of_problem, "min_of_problem");
	echo '</td>';
	echo '</tr>';
	
	echo_reported_to($reported_to);
	
	echo '<tr>';
	echo '<th>';
	echo 'Problem description';
	echo '</th>';
	echo '<td>';
	echo '<textarea name="problem_description" rows="5" cols="40">' . $description . '</textarea>';
	echo '</td>';
	echo '</tr>';
	
	
	
	
	echo '<tr>';
	echo '<th>';
	echo 'Closed date';
	echo '</th>';
	echo '<td>';
	echo '<input name="closed_date" id="closed_date" type="text" value="' . $closed_date . '">&nbsp;';
	echo 'Close case?&nbsp;';
	echo '<select name="close">';
	echo '<option>Yes</option>';
	echo '<option>No</option>';
	echo '</select>';
	echo '</td>';
	echo '</tr>';
	
	
	
	echo '<tr>';
	echo '<th>';
	echo 'Closed time';
	echo '</th>';
	echo '<td>';
	echo_hour($closed_hour, "closed_hour");
	echo ":";
	echo_min($closed_min, "closed_min");
	echo '</td>';
	echo '</tr>';
	
	
	
	//~ echo '<tr>';
	//~ echo '<th>';
	//~ echo 'Closed by';
	//~ echo '</th>';
	//~ echo '<td>';
	//~ echo '<input id="resolve_date" name="resolve_date" type="text" value="' . $closed_by . '">';
	//~ echo '</td>';
	//~ echo '</tr>';
	
	echo '<tr>';
	echo '<th>';
	echo 'Submit';
	echo '</th>';
	echo '<td>';
	echo '<input name ="submit" type="submit">';
	echo '</td>';
	echo '</tr>';
	echo '</table>';
	echo '</form>';
	
	
	mysql_close();
	
}

function echo_hour($hour, $name) {
	echo '<select name="' . $name . '">';
	for ($i = 0; $i < 24; $i++) {
		if ($i < 10)
			$temp_hour = "0" . $i;
		else
			$temp_hour = $i;
		
		if ($hour != $temp_hour)
			echo '<option>' . $temp_hour . '</option>';
		if ($hour == $temp_hour)
			echo '<option selected>' . $temp_hour . '</option>';
	}
	echo '</select>';
}

function echo_min($min, $name) {
	echo '<select name="' . $name . '">';
	for ($i = 0; $i < 60; $i++) {
		if ($i < 10)
			$temp_min = "0" . $i;
		else
			$temp_min = $i;
		
		if ($min != $temp_min)
			echo '<option>' . $temp_min . '</option>';
		if ($min == $temp_min)
			echo '<option selected>' . $temp_min . '</option>';
	}
	echo '</select>';
}

function echo_reported_to($reported_to) {
	echo '<tr>';
	echo '<th>';
	echo 'Reported to';
	echo '</th>';
	echo '<td>';
	//echo '<select name="reported_to" value="' . $reported_to . '">';
	echo '<select name="reported_to">';
	if ($reported_to == "IT") {
		echo '<option selected>IT</option>';
		echo '<option>NetEng</option>';
		echo '<option>VTT</option>';
		echo '<option>NOC</option>';
	}
	if ($reported_to == "NetEng") {	
		echo '<option>IT</option>';
		echo '<option selected>NetEng</option>';
		echo '<option>VTT</option>';
		echo '<option>NOC</option>';
	}
	if ($reported_to == "VTT") {
		echo '<option>IT</option>';
		echo '<option>NetEng</option>';
		echo '<option selected>VTT</option>';
		echo '<option>NOC</option>';
	}
	if ($reported_to == "NOC") {
		echo '<option>IT</option>';
		echo '<option>NetEng</option>';
		echo '<option>VTT</option>';
		echo '<option selected>NOC</option>';
	}
	echo '</select>';
	echo '</td>';
	echo '</tr>';
	
	
	
}


get_entry($id);

?>
</body>
</html>


The problem is for the table in line 188. it should look like this: http://img571.imageshack.us/img571/5183/shouldlooklike.png but instead it looks like this: http://img860.imageshack.us/img860/323/lookslikethis.png

The same problem appears in IE.

Thank you,

There is a php page I have created at work which works fine with Firefox 3.6. In one specific page Firefox 4 does not show correctly a table with CSS. I tried to remove the css and just have the table with no styling but the problem persists. the php file is this: <pre><nowiki><html> <head> <title>Pending Issues Close Case</title> <style type="text/css"> #blinking {text-decoration: blink; text-align:left; color:#FF0000;} body { background-image:url('on2.jpg'); background-repeat:no-repeat; background-position:700 50; background-attachment:fixed; } #efms { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse:collapse; } #efms td, #efms th { font-size:1em; border:1px solid #98bf21; padding:3px 7px 2px 7px; } #efms th { font-size:1.1em; text-align:left; padding-top:5px; padding-bottom:4px; background-color:#A7C942; color:#ffffff; } #efms tr.alt td { color:#000000; background-color:#EAF2D3; } </style> <link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" /> <script type="text/javascript" src="jsDatePick.min.1.3.js"></script> <script type="text/javascript"> window.onload = function(){ new JsDatePick({ useMode:2, target:"date_of_problem", dateFormat:"%Y-%m-%d" }); new JsDatePick({ useMode:2, target:"closed_date", dateFormat:"%Y-%m-%d" }); }; function checkEmpty() { var date_of_problem = document.save_entries.date_of_problem.value; var hour_of_problem = document.save_entries.hour_of_problem.value; var min_of_problem = document.save_entries.min_of_problem.value; var reported_to = document.save_entries.reported_to.value; var problem_description = document.save_entries.problem_description.value; var close = document.save_entries.close.value; var closed_date = document.save_entries.closed_date.value; var closed_hour = document.save_entries.closed_hour.value; var closed_min = document.save_entries.closed_min.value; var ok = "true"; var why = ""; var ok2 = "true"; var tmp1 = date_of_problem.split("-"); var date1 = new Date(tmp1[0], tmp1[1], tmp1[2], hour_of_problem, min_of_problem); var tmp2 = closed_date.split("-"); var date2 = new Date(tmp2[0], tmp2[1], tmp2[2], closed_hour, closed_min); if (date_of_problem.length == 0) { ok = "false"; why += "Date of problem is empty\n"; } if (reported_to.length == 0) { ok = "false"; why += "Reported to is empty\n"; } if (problem_description.length == 0) { ok = "false"; why += "Problem description is empty\n"; } if (closed_date.length == 0 && close == "Yes") { ok = "false"; why += "Closed date is empty\n"; } if (date2 < date1) { ok = "false"; why +="Closed date cannot be earlier than problem date\n"; } if (ok == "true") { return true; } else { alert(why); return false; } } </script> </head> <body> <?php session_start(); if (!isset($_SESSION['pending_user'])){ header("location:main_login.php"); } if ($_GET['entry'] == "" || $_GET['entry'] == NULL) header("location:view_entries.php"); $id = $_GET['entry']; function get_entry($id) { $mysql_host = "localhost"; $mysql_user = "portal"; $mysql_pass = "portal"; $db_name = "pending_issues"; $entries_table = "entries"; mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass") or die("cannot connect to DB" . mysql_error()); mysql_select_db("$db_name")or die("cannot select DB" . mysql_error()); mysql_query("set names 'utf8'")or die("fook!" . mysql_error()); $entry_query = "SELECT * FROM $entries_table WHERE id='$id'"; $entry_data = mysql_query($entry_query) or die("Cannot execute query"); $entry_row = mysql_fetch_array($entry_data) or die("Cannot fetch row"); /////////////////////////// $date_of_problem = $entry_row['date_of_problem']; $time_of_problem = $entry_row['time_of_problem']; $hour_of_problem = strtok($time_of_problem, ":"); $min_of_problem = strtok(":"); $resp_technician =$entry_row['resp_technician']; $reported_to = $entry_row['reported_to']; $description = $entry_row['problem_description']; $closed_date = $entry_row['closed_date']; $closed_time = $entry_row['closed_time']; $closed_hour = strtok($closed_time, ":"); $closed_min = strtok(":"); $closed_by = $_SESSION['pending_user']; echo '<h2><font color="#A7C942">Welcome, ' . $_SESSION['pending_user'] . '</font></h2>'; echo '<table id="efms">'; echo '<tr class="alt">'; echo '<td>'; echo '<br><a href=index.php>Home</a><br><br>'; echo '</td>'; echo '<td>'; echo '<br><a href=view_entries.php>View entries</a><br><br>'; echo '</td>'; echo '<td>'; echo '<a align="center" href="logout.php">Log out</a><br>'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '<br>'; echo '<form name="save_entries" action="save_entries.php" method="post" onSubmit="return checkEmpty();"'; echo '<table id="efms">'; echo '<tr>'; echo '<th>'; echo 'Problem date'; echo '</th>'; echo '<td>'; echo '<input id="date_of_problem" name="date_of_problem" type="text" value="' . $date_of_problem . '">'; echo '<input type="hidden" name="entry" value="' . $id . '">'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<th>'; echo 'Problem time'; echo '</th>'; echo '<td>'; //echo '<input name="time\_of\_problem" type="text" value="' . $time_of_problem . '">'; echo_hour($hour_of_problem, "hour_of_problem"); echo ":"; echo_min($min_of_problem, "min_of_problem"); echo '</td>'; echo '</tr>'; echo_reported_to($reported_to); echo '<tr>'; echo '<th>'; echo 'Problem description'; echo '</th>'; echo '<td>'; echo '<textarea name="problem_description" rows="5" cols="40">' . $description . '</textarea>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<th>'; echo 'Closed date'; echo '</th>'; echo '<td>'; echo '<input name="closed_date" id="closed_date" type="text" value="' . $closed_date . '">&nbsp;'; echo 'Close case?&nbsp;'; echo '<select name="close">'; echo '<option>Yes</option>'; echo '<option>No</option>'; echo '</select>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<th>'; echo 'Closed time'; echo '</th>'; echo '<td>'; echo_hour($closed_hour, "closed_hour"); echo ":"; echo_min($closed_min, "closed_min"); echo '</td>'; echo '</tr>'; //~ echo '<tr>'; //~ echo '<th>'; //~ echo 'Closed by'; //~ echo '</th>'; //~ echo '<td>'; //~ echo '<input id="resolve_date" name="resolve_date" type="text" value="' . $closed_by . '">'; //~ echo '</td>'; //~ echo '</tr>'; echo '<tr>'; echo '<th>'; echo 'Submit'; echo '</th>'; echo '<td>'; echo '<input name ="submit" type="submit">'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</form>'; mysql_close(); } function echo_hour($hour, $name) { echo '<select name="' . $name . '">'; for ($i = 0; $i < 24; $i++) { if ($i < 10) $temp_hour = "0" . $i; else $temp_hour = $i; if ($hour != $temp_hour) echo '<option>' . $temp_hour . '</option>'; if ($hour == $temp_hour) echo '<option selected>' . $temp_hour . '</option>'; } echo '</select>'; } function echo_min($min, $name) { echo '<select name="' . $name . '">'; for ($i = 0; $i < 60; $i++) { if ($i < 10) $temp_min = "0" . $i; else $temp_min = $i; if ($min != $temp_min) echo '<option>' . $temp_min . '</option>'; if ($min == $temp_min) echo '<option selected>' . $temp_min . '</option>'; } echo '</select>'; } function echo_reported_to($reported_to) { echo '<tr>'; echo '<th>'; echo 'Reported to'; echo '</th>'; echo '<td>'; //echo '<select name="reported_to" value="' . $reported_to . '">'; echo '<select name="reported_to">'; if ($reported_to == "IT") { echo '<option selected>IT</option>'; echo '<option>NetEng</option>'; echo '<option>VTT</option>'; echo '<option>NOC</option>'; } if ($reported_to == "NetEng") { echo '<option>IT</option>'; echo '<option selected>NetEng</option>'; echo '<option>VTT</option>'; echo '<option>NOC</option>'; } if ($reported_to == "VTT") { echo '<option>IT</option>'; echo '<option>NetEng</option>'; echo '<option selected>VTT</option>'; echo '<option>NOC</option>'; } if ($reported_to == "NOC") { echo '<option>IT</option>'; echo '<option>NetEng</option>'; echo '<option>VTT</option>'; echo '<option selected>NOC</option>'; } echo '</select>'; echo '</td>'; echo '</tr>'; } get_entry($id); ?> </body> </html> </nowiki></pre> <br /> The problem is for the table in line 188. it should look like this: http://img571.imageshack.us/img571/5183/shouldlooklike.png but instead it looks like this: http://img860.imageshack.us/img860/323/lookslikethis.png The same problem appears in IE. Thank you,

Modified by cor-el

All Replies (1)

more options

Please do not consider my previous post as I found out that it was a coding error, a forgotten ">"

Thank you.