Jump to content
Sign in to follow this  

Problem with function require() and display in firefox and chrome

Recommended Posts

The code is as following:



<?php 	include("fix.php");?>

file: fix.php

<html>	<head>		<title></title>		<link rel="stylesheet" type="text/css" href="styles/styles.css" />	</head>	<body style="margin:0px;">		<h1 style="background-color:red;margin:0px;">Problem</h1>	</body></html>

When I open file fix.php in firefox and chrome are ok (there is no margin between tag h1 and top boundary of browsers).

However, when I open file index.php, in firefox is OK (no margin), but in Chrome, there a margin between them.

Please, explain to me the reason. Is it because of the function require () ???

Edited by thichtomo

Share this post

Link to post
Share on other sites



I couldn't replicate your issue. They looked the same looking at either file on my system.


I would suggest a change to your code though, add a doctype to your code...



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...