Forum Moderators: coopster
I'm experiencing some funny things on my site when my .php pages are displayed. I am using the same CSS style sheets as the .htm pages but, on all of .php pages the font is larger and the main content div is a few pixels lower than my .htms in IE6.
I open the same pages in Mozilla and, no problem. The fonts stay the same and, the div stays similiarly placed as my htm pages.
Has anyone ever encountered something like this when using CSS? I guess I could create a seperate CSS sheet for my php pages. I'm just pretty clueless as to why the .php pages are being displayed this way. Thanks
TJ
In fact, if you really want to see that it isn't the php, take your html from a page you know is working correctly and put it in a test PHP page and simply do a print or echo. It should spit out the exact same stuff....lets hope ;-)
<?
print "PASTE YOUR EXACT HTML HERE";
?>
regarding something looking a certain way in one browser and not the other. This is Quite common with style sheets! Its a pain I know (as I've gone through this) but you have to do a lot of testing to see what works in each browser. It may sound too simple, but one browser could disply a font pixel size so slightly different that you may think its the same....but its enough to through off the rest of your page.
I hope I've been some sort of help.
I've been designing with CSS for several sites now. It's been quite some time since I first opened my beautiful (inIE6) pages in Mozilla and, realized the major drawbacks of CSS. I'd like to think that I know enough about it now to avoid the most common mistakes.
If it was only one php page, your suggestion might make sense. This occurs on every php page and, I converted two of those from htm pages. I'll keep searching in the markup, thanks for the input.
TJ
as a test - open a .php page in your favourite browser, then save that file (html only) to disk - upload it to your webserver, and open it... i.e. you'll have the end result from the php in static html - if it renders like you find html pages are, not like a php page, then that indicates there is indeed a deeper problem with your server configuration - if however the saved php->html->server-again page displays like the php page it was saved from - then that points to your php being coded differently to your html - maybe the templates you use are different, or tags are not properly built up. i hope this is of some help, and good luck - i'd be interested to hear what you find the problem s.
I have another site where two pages with identical mark-up display differently in IE5 Mac & Mozilla. The php page displays fine but, the htm page lines my divs up straight to the bottom of the page. In this case, the php page is doing what I want. I have everything identical in the page so, it has to be something in the browsers' rendering of the php page. I have since fixed the problem by adding a container div but, it still seems strange that the extension caused a different output to the browser.