Hi all - thanks for your feedback. I fixed the problem by removing the margin-bottom from header, and adding it to menu. Then it displays ok across all browsers.
Hi Paul - thank you! Youāre right, it doesnāt make sense to use html4 any more. Am I right in understanding your advice is:
(1) change this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
to this:
<!DOCTYPE html>
And somewhere inside <head> add this:
<!-- the next script is the html5shiv and for media query support in IE8 and under -->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
I say āsomewhere insideā because my header.php begins with doctype and ends with a meta property, then in each individual file it continues with more metaās (e.g. the ogās unique to that file) and </head> ends in the individual file template, not in the header template.
So my idea is to add the html5shiv to header.php template. Is that ok? Itāll end up looking something like this:
<head>
<meta charset...
etc meta's
<!-- the next script is the html5shiv and for media query support in IE8 and under -->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--that's the end of header.php and now begins the individual file.php-->
<link rel="canonical" ...
<meta <meta property="og:url" ... etc bunch of meta og's
<?php wp_head(); ?>
</head>
Itās not a wordperfect page but I call the wp environment so as to use a wp plugin (ajax testimonials).
you should have stuck to using divs
you mean instead of the css tables?
or upgrade to the html5 doctype and use the new elements with the shive and a suitable reset.
(2) Yes Iāll do that! Can you confirm itās ok to stick the shiv anywhere inside <head>?
(3) What does āa suitable resetā mean? Is that the display:block? Iām scared to add that to #header, so that instead of this:
#header{width:100%;}
it becomes:
#header{width:100%;display block;}
The file.php template is:
<header id="header" role="banner"><?php include("$rpath/1cde/head.php"); ?></header>
and head.php has all the css table stuff with logo, fontawesome icons, subscribe form, postit image, and then the non-table #menu. Iām scared to set all that to display:block, in case it messes with tables which have their own display rules.
I feel more comfortable just moving the margin-bottom away from #header and down to #menu. And leaving headerās only rule as width:100%.
Iām really grateful you brought up that doctype. Itās something we all forgot when making the template responsive.
thank you! - Val