Two <div> is not visible?

Hi guys,

Why I can’t see the two header

.boxhead on this site?

You only see it when you resize/shrink it into smaller viewport/browser size.
How do I fix this?

thanks in advance.

Edit: Yeah of course my solution doesn’t will work. Sorry i’ve read too fast and missed details. Sorry :persevere:

I don’t think your answer is correct?

Actually I tried to fix it I just added this codes below,

<div id="menu">
	<div class="clearfix">
		<?php include 'menu.php'; ?>

and it works, the two div is showing up now.
My question now is, Am I doing the right thing?

thanks in advance.


You need to contain your floats. Add the clearfix to the header like so:

<div id="header" class="clearfix">

Floats are removed from the flow so if there is no other content in the element then the backgrounds of other elements will slide up to the containing block and will sometimes sit on top of the floated content because the parent of the float has zero height.

There is never a need to add an empty clearfix rule to the page as that is not what clearfix is for. You add the clearfix to the parent of the element that contains the floats.

thanks for explaining.
will follow you.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.