GPSJane Posted December 30, 2009 Share Posted December 30, 2009 For some weird (and as yet unbeknown to me) reason when I changed all my H3 tags across my site to DIV tags my whole site broke!I changed <?php include("includes/head.html"); ?> <?php include("includes/nav_bar.html"); ?> <?php include("includes/loc_menu.html"); ?> <DIV id="content"> <H3="title1">Location</H3> <P>content goes here</P> </DIV> <?php include("includes/footer.html"); ?> ...with <?php include("includes/head.html"); ?> <?php include("includes/nav_bar.html"); ?> <?php include("includes/loc_menu.html"); ?> <DIV id="content"> <DIV="title1">Location</DIV> <P>content goes here</P> </DIV> <?php include("includes/footer.html"); ?> CSS is #content {width : 580px;margin : 0;padding : 0px 25px 35px 45px;float : left;background-color : white;text-align : left;color : #202020;border-style : none;}DIV.title1 {font-size : larger;line-height : 1.8;font-weight : bold;} All I did was replace H3 with DIV. Aaargh! Link to comment Share on other sites More sharing options...
jeffman Posted December 31, 2009 Share Posted December 31, 2009 <h> elements come with default padding or margins, depending on the browser. Try setting them both to 0 and then adjusting from there. <div> elements default to zero padding or margins, so the difference that could make might be big, especially vertically.Also: is this really the way this tag looks?<DIV="title1">Maybe you need a space and an id attribute in there? Link to comment Share on other sites More sharing options...
jlhaslip Posted December 31, 2009 Share Posted December 31, 2009 Using a styled Div for your Headings violates the semantics of the page. Headings are used for the pages structure and a styled Div removes the inherent structure for that text in the page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.