I recently converted all my .html files to .php, and while the stylesheet they're linked to (which hasn't changed) works almost perfectly, the <h1> through <h6> tags (headings) don't work with the new .php files. The font appears the same size as the body, which is too small to be legible with the font I chose for my article titles and subtitles, which use <h1> and <h2>. It's strange; when I update any class at all, the changes appear in-browser on refresh, as they should. But not so for the headings.
Any advice?

Recommended Answers

All 3 Replies

can you post an example? link or sample code, something we can test.

Actually, I've just solved the issue. My style.css file — a result of a merger of all my other CSS files which, incidentally, I did when converting my site to PHP — contained contradicting classes.

<?php header ('content-type:text/css');
ob_start("ob_gzhandler"); ?>
/* <style type=text/css> */ 
@media all {.dontall {display:none;}}
@media handheld { img { display:none; } }
@media print {
 body {font-size:10pt; font-family:verdana, arial, sans-serif;}
 .dontprint {display:none;}
 .lt {float:left;text-align:right;width:30%;}
 .rt {float:right;text-align:left;width:65%;}
 .bk {clear:both;width:97%;border:#778899 solid 0;margin:4pt 1% 4pt 1%;padding:4pt;}
 .bkb {width:95%;border:#778899 solid 1pt;margin:4pt 1% 4pt 1%;padding:4pt;}
 .block {float:left;border:#778899 solid 1pt;margin:5pt;padding:2pt;}
 .blockr {float:right;text-align:left;border:#778899 solid 1px;margin:5pxpadding:5px;}
 fieldset {border:none;}
 p {padding:1px;margin:0;list-style-type:square;}
 p:first-line {font-weight:bold;}
 p:first-letter {font-size:100%;}
@media screen {
 .dontshow{ display:none;} 
 .doshow{ display:inline;}
a {text-decoration:none;padding:0 3px;}
a:hover {background-color:#66cdaa;text-decoration:none;}
a:focus {background-color:#66cdaa;text-decoration:none;}
<?php ob_flush();?>

the first 2 and last 1 lines, style.css as style.css.php

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.