thichtomo
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by thichtomo
-
-
I have a piece of code like following:
body { margin:0px; font-family:"Segoe UI",Tahoma,Verdana; font-size:14px; background-color:#E3E3E3;}h1 { background-color:#9dc45f;}
<html> <head> <title></title> <link rel="stylesheet" type="text/css" href="styles/styles.css"/> </head> <body> <div id="header"> <h1>Tag h1 is displayed differently in Chrome and Firefox. Please, tell me why? </h1> </div> </body></html>
In Chrome, there is no margin between <h1> and top boundary of browser (as expected). But in Firefox, there is still a distance, approximately 19px, between them. I don't find out the reason of this issue. Please, tell me why!
-
Although I do not know exactly why browsers do not render it the same, the correct way to achieve this make the following changes in bold:
#center { border: 1px solid #FFFFFF; border-radius: 10px; height: 200px; left: 50%; margin: -100px 0 0 -250px; position: absolute; top: 50%; width: 500px;}
If we use: position:absolute, it works well even in firefox. In my opinion, if we put margin-left and margin-right as auto, browsers will automatically set divs horizontally center.
-
I have a piece of CSS as following (in order to align a div vertically center)
#center { position:relative; height:200px; width:500px; top:50%; margin:-100px auto 0px auto; border-radius:10px; border:1px solid white;}
In Chrome, it works well, as in the first illustration:
but in Firefox, it's displayed as following:
Please, explain to me the reason of the issue. You can check this issue in your browser by link: http://thichtomo.com/example/
Problem with function require() and display in firefox and chrome
in PHP
Posted · Edited by thichtomo
The code is as following:
file:index.php
file: fix.php
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 () ???