Firefox ignoring positioning parts of CSS
-
Alright I have a .php document that lists the results from a query into a table, and has some controls above the table that allow me to make changes to entries if something isn't quite right. Here is the CSS:
body {
background-color: #cccccc;
}#changeStatus {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 2em;
top: -10em;
}#changeUser {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 28em;
top: -10em;
}#changeRequired {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 55em;
top: -10em;
}#changeRequested {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 86em;
top: -10em;
}#itlisttableadmin {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
position: absolute;
left: 0em;
top: 8em;
}th {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
color: maroon;
}td {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
}IE of course garbles it up just because it's IE, but it works just fine in Opera. Everything looks exactly how it should. When I open the page in Firefox, the font-family and font-size for the #change sections work fine, but the positioning doesn't. All the other parts of the CSS work. Can someone tell me what I'm doing wrong? The CSS statement is called in the PHP like this
echo "";
. -
Alright I have a .php document that lists the results from a query into a table, and has some controls above the table that allow me to make changes to entries if something isn't quite right. Here is the CSS:
body {
background-color: #cccccc;
}#changeStatus {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 2em;
top: -10em;
}#changeUser {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 28em;
top: -10em;
}#changeRequired {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 55em;
top: -10em;
}#changeRequested {
font-family: arial, helvetica, sans-serif;
font-size: 0.6em;
position: absolute;
left: 86em;
top: -10em;
}#itlisttableadmin {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
position: absolute;
left: 0em;
top: 8em;
}th {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
color: maroon;
}td {
font-family: arial, helvetica, sans-serif;
font-size: 0.8em;
}IE of course garbles it up just because it's IE, but it works just fine in Opera. Everything looks exactly how it should. When I open the page in Firefox, the font-family and font-size for the #change sections work fine, but the positioning doesn't. All the other parts of the CSS work. Can someone tell me what I'm doing wrong? The CSS statement is called in the PHP like this
echo "";
. -
I don't see any errors in the css code, but without knowing where the elements are in relation to the table it's hard to say if it makes sense or not...
Despite everything, the person most likely to be fooling you next is yourself.
They are supposed to be above the table and across the top like this http://i30.photobucket.com/albums/c305/m450n/opera.jpg But in Firefox they look like this http://i30.photobucket.com/albums/c305/m450n/firefox.jpg Do you need to see any pieces of the PHP code itself or would that make a difference?
-
They are supposed to be above the table and across the top like this http://i30.photobucket.com/albums/c305/m450n/opera.jpg But in Firefox they look like this http://i30.photobucket.com/albums/c305/m450n/firefox.jpg Do you need to see any pieces of the PHP code itself or would that make a difference?
The identifiers are case sensetive, are the id:s of the elements exactly as you have written in the css? Some browsers ignore this rule and matches the identifiers as non case sensetive, which could explain why Opera applies the positioning but not Firefox. I'm just guessing here... that's the best I can do without seeing any of the html code...
Despite everything, the person most likely to be fooling you next is yourself.
-
The identifiers are case sensetive, are the id:s of the elements exactly as you have written in the css? Some browsers ignore this rule and matches the identifiers as non case sensetive, which could explain why Opera applies the positioning but not Firefox. I'm just guessing here... that's the best I can do without seeing any of the html code...
Despite everything, the person most likely to be fooling you next is yourself.
Yes I checked the cases, just to be sure I changed them to all lowercase in both places. No change in either browser. The odd thing is that I have another table setup (one for the admins and one for the users) that shows up perfectly in both Opera and Firefox. It's written the exact same way and I can't figure out why it is that the admin one won't work when the regular user one does. Suggestions on what to try next?
-
Yes I checked the cases, just to be sure I changed them to all lowercase in both places. No change in either browser. The odd thing is that I have another table setup (one for the admins and one for the users) that shows up perfectly in both Opera and Firefox. It's written the exact same way and I can't figure out why it is that the admin one won't work when the regular user one does. Suggestions on what to try next?
-
47_MasoN_47 wrote:
Suggestions on what to try next?
Show some code.
Despite everything, the person most likely to be fooling you next is yourself.
"; // Display retrieved data with while loop echo "
"; echo ""; echo ""; while($row = mysql_fetch_array($request)){ // Print out list of IT requests into a table echo ""; } echo ""; echo "
"; echo "
"; echo "
Case #:
"; echo "
New Status:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
"; echo "
Case #:
"; echo "
New User Name:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
"; echo "
Case #:
"; echo "
New Date Required:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
Case #
User Name
Date Requested
Date Required
Problem
Status
"; echo $row['id']; echo "
"; echo $row['userName']; echo "
"; echo $row['dateRequested']; echo "
"; echo $row['dateRequired']; echo "
"; echo $row['problem']; echo "
"; echo $row['status']; echo "
-
"; // Display retrieved data with while loop echo "
"; echo ""; echo ""; while($row = mysql_fetch_array($request)){ // Print out list of IT requests into a table echo ""; } echo ""; echo "
"; echo "
"; echo "
Case #:
"; echo "
New Status:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
"; echo "
Case #:
"; echo "
New User Name:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
"; echo "
Case #:
"; echo "
New Date Required:
"; echo "
"; echo ""; echo "
"; echo "
"; echo "
Case #
User Name
Date Requested
Date Required
Problem
Status
"; echo $row['id']; echo "
"; echo $row['userName']; echo "
"; echo $row['dateRequested']; echo "
"; echo $row['dateRequired']; echo "
"; echo $row['problem']; echo "
"; echo $row['status']; echo "
Do you have a doctype, a html element, a head element and a body element, or is that all the code? There are elements using implicit end tags as in XHTML, but the code is not at all valid XHTML. There is no end tag for the table, which in itself may very well mess up the page.
Despite everything, the person most likely to be fooling you next is yourself.
-
Do you have a doctype, a html element, a head element and a body element, or is that all the code? There are elements using implicit end tags as in XHTML, but the code is not at all valid XHTML. There is no end tag for the table, which in itself may very well mess up the page.
Despite everything, the person most likely to be fooling you next is yourself.
That is all the code. Since it's PHP I didn't think about having a doctype and whatnot. I'll make some changes and just see what happens. Thanks for the suggestion, even if it doesn't fix it at least that's one more step making the code more valid.
-
That is all the code. Since it's PHP I didn't think about having a doctype and whatnot. I'll make some changes and just see what happens. Thanks for the suggestion, even if it doesn't fix it at least that's one more step making the code more valid.
47_MasoN_47 wrote:
That is all the code. Since it's PHP I didn't think about having a doctype and whatnot.
That means that what you are sending to the browser isn't even close to be a valid html document, or even an html document at all. The browsers makes their best to try to display it as html anyway, but you can't expect it to work properly. To be an html document, the page has to have a html, head, title and body tag:
<html>
<head>
<title>Minimal</title>
</head>
<body>
A minimal html document.
</body>
</html>Despite everything, the person most likely to be fooling you next is yourself.
-
47_MasoN_47 wrote:
That is all the code. Since it's PHP I didn't think about having a doctype and whatnot.
That means that what you are sending to the browser isn't even close to be a valid html document, or even an html document at all. The browsers makes their best to try to display it as html anyway, but you can't expect it to work properly. To be an html document, the page has to have a html, head, title and body tag:
<html>
<head>
<title>Minimal</title>
</head>
<body>
A minimal html document.
</body>
</html>Despite everything, the person most likely to be fooling you next is yourself.
Yeah I generally write valid XHTML 1.0 Strict, I just didn't think about it since it was inside PHP. I taught myself PHP and am still learning a lot. I have a strong feeling that is what the problem is. Over the weekend I'm going to go through each piece of this site and change it so that it's valid. Thanks a lot for the suggestion, I never would have thought about the browser being so confused at what I was trying to display.
-
Yeah I generally write valid XHTML 1.0 Strict, I just didn't think about it since it was inside PHP. I taught myself PHP and am still learning a lot. I have a strong feeling that is what the problem is. Over the weekend I'm going to go through each piece of this site and change it so that it's valid. Thanks a lot for the suggestion, I never would have thought about the browser being so confused at what I was trying to display.
For the record, after adding the proper tags to the HTML generated by the PHP and putting the end tag on the tables it fixed the problem. Now Firefox and Opera are both displaying the page in the same way.