Hi.
Im trying to make a cross-browser (IE, Opera, FF) compatible webpage.
Im having a problem with the main content section in my page however.
Im trying to use only CSS i.e. no tables but I get the following problems:
1) If I float the main content section to the right (shown here (<!-- m --><a class="postlink" href="http://83.245.92.158/test1.php">http://83.245.92.158/test1.php</a><!-- m -->) [test1.php] ) then it displays correctly in IE but is shifted way too much to the right in FF and Opera.
2) If, however, I change the margin-left of the main content section to 190px or beyond it displays correctly in all three browsers but in IE the first few lines are always indented by a few spaces (which I believe is due to the floating div on the left of it). see here (<!-- m --><a class="postlink" href="http://83.245.92.158/test2.php">http://83.245.92.158/test2.php</a><!-- m -->)
I would preferably like to use something like IE displays on 1) above.
Thanks for any help you can provide.The problem is IE. You are using the xml prologue and IE doesn't know what to do with it so it goes into quirks mode. Only modern browsers can handle xhtml so delete that first line.
Now, take the hint from the fact that your code works in old, buggy non-standard IE but not in any of the other modern browsers. Never, ever design using IE until after you get your code working properly and tested in the modern browsers. And that includes buggy, non-standard IE7.The problem is IE. You are using the xml prologue and IE doesn't know what to do with it so it goes into quirks mode. Only modern browsers can handle xhtml so delete that first line.
Now, take the hint from the fact that your code works in old, buggy non-standard IE but not in any of the other modern browsers. Never, ever design using IE until after you get your code working properly and tested in the modern browsers. And that includes buggy, non-standard IE7.
Ive taken out the <?xml ...?> prologue but still IE indents the first few lines.
Yess I do code for the modern browsers but would like IE to be included because even though I too despise IE, the fact remains, most people who dont know the intracacies of web development use IE as it comes standard on their machines. This is who the website will be for which is why i need IE compatibility.
PS. im using
<?php
header("Content-type: text/html");
?>
as the first line in my code Ive tried changing to
<?php
header("Content-type: application/xhtml + xml");
?>
to no avail aswell. does that make a difference?would like IE to be included I didn't say not to include IE. I'm saying if you code to IE first then you are going to have problems. You have to make it work in FF first, then adjust for IEs quirks and bugs, but get the code right first.IE is screwing you up and not floating like it should. Set a width for the div and then it will work. As usual, FF is displaying this correctly.Thanks alot drhowarddrfine - setting the div width worked but obviously not my intention to make it fixed width.
I dont know if you might know any mini-hack to make me avoid using a specific width?
coz it looks like if you dont know - no-one will. ur a genious.well Ive done something that makes the indentations go away. It will be a headache for multiple pages.
If you wanna see it go to the 2nd link, above and view source and read comment
Im trying to make a cross-browser (IE, Opera, FF) compatible webpage.
Im having a problem with the main content section in my page however.
Im trying to use only CSS i.e. no tables but I get the following problems:
1) If I float the main content section to the right (shown here (<!-- m --><a class="postlink" href="http://83.245.92.158/test1.php">http://83.245.92.158/test1.php</a><!-- m -->) [test1.php] ) then it displays correctly in IE but is shifted way too much to the right in FF and Opera.
2) If, however, I change the margin-left of the main content section to 190px or beyond it displays correctly in all three browsers but in IE the first few lines are always indented by a few spaces (which I believe is due to the floating div on the left of it). see here (<!-- m --><a class="postlink" href="http://83.245.92.158/test2.php">http://83.245.92.158/test2.php</a><!-- m -->)
I would preferably like to use something like IE displays on 1) above.
Thanks for any help you can provide.The problem is IE. You are using the xml prologue and IE doesn't know what to do with it so it goes into quirks mode. Only modern browsers can handle xhtml so delete that first line.
Now, take the hint from the fact that your code works in old, buggy non-standard IE but not in any of the other modern browsers. Never, ever design using IE until after you get your code working properly and tested in the modern browsers. And that includes buggy, non-standard IE7.The problem is IE. You are using the xml prologue and IE doesn't know what to do with it so it goes into quirks mode. Only modern browsers can handle xhtml so delete that first line.
Now, take the hint from the fact that your code works in old, buggy non-standard IE but not in any of the other modern browsers. Never, ever design using IE until after you get your code working properly and tested in the modern browsers. And that includes buggy, non-standard IE7.
Ive taken out the <?xml ...?> prologue but still IE indents the first few lines.
Yess I do code for the modern browsers but would like IE to be included because even though I too despise IE, the fact remains, most people who dont know the intracacies of web development use IE as it comes standard on their machines. This is who the website will be for which is why i need IE compatibility.
PS. im using
<?php
header("Content-type: text/html");
?>
as the first line in my code Ive tried changing to
<?php
header("Content-type: application/xhtml + xml");
?>
to no avail aswell. does that make a difference?would like IE to be included I didn't say not to include IE. I'm saying if you code to IE first then you are going to have problems. You have to make it work in FF first, then adjust for IEs quirks and bugs, but get the code right first.IE is screwing you up and not floating like it should. Set a width for the div and then it will work. As usual, FF is displaying this correctly.Thanks alot drhowarddrfine - setting the div width worked but obviously not my intention to make it fixed width.
I dont know if you might know any mini-hack to make me avoid using a specific width?
coz it looks like if you dont know - no-one will. ur a genious.well Ive done something that makes the indentations go away. It will be a headache for multiple pages.
If you wanna see it go to the 2nd link, above and view source and read comment