Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,876 members, 7,806,511 topics. Date: Tuesday, 23 April 2024 at 05:38 PM

Help Needed!!! Content Appearing Behind Fixed Header - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Help Needed!!! Content Appearing Behind Fixed Header (1952 Views)

[PHP] [HOWTO] Send 'POST' Data Through Header ?? / How To Add Header Image To Blogger / Free Website Design Graphics Header Generator (2) (3) (4)

(1) (Reply) (Go Down)

Help Needed!!! Content Appearing Behind Fixed Header by Nobody: 9:49pm On Jun 20, 2012
I fixed the header section of a website, but the first div of the page appears behind the header; instead of starting from the end of the header.
Re: Help Needed!!! Content Appearing Behind Fixed Header by DualCore1: 7:04am On Jun 21, 2012
put this in your CSS

.clear{clear:both}

Put this inbetween the header div and the other div

<div class="clear"></div>

1 Like

Re: Help Needed!!! Content Appearing Behind Fixed Header by yawatide(f): 12:24pm On Jun 21, 2012
1) It would be nice to get a link to the site so one can see the code for themselves

2) If you used a float, Dual's solution will work. If you used a combination of absolute and relative positioning, then apply a high z-index to that first DIV

3) Dual core, don't suffer from divitis. Use <br class="clear" /> instead. Besides divitis, it is also less code. Considering we do a lot of clearing these days and considering the Nigerian (mostly mobile) environment, the less code does add up over time cool cool tongue wink cool
Re: Help Needed!!! Content Appearing Behind Fixed Header by DualCore1: 2:54pm On Jun 21, 2012
Thanks Yawa, that's noted smiley.

But using <br>'s na breakitis naw... tongue

I get the point. Thanks.
Re: Help Needed!!! Content Appearing Behind Fixed Header by william5: 3:49am On Jun 22, 2012
Dual Core: put this in your CSS

.clear{clear:both}

Put this inbetween the header div and the other div

<div class="clear"></div>

Even lesser code

<div class="clear" id="nextSection">Put Content Here</div>
Re: Help Needed!!! Content Appearing Behind Fixed Header by yawatide(f): 12:19pm On Jun 22, 2012
^^^ Have you actually counted the number of characters b/w Dual's DIV clear, my BR clear and your code above?
Re: Help Needed!!! Content Appearing Behind Fixed Header by william5: 6:16pm On Jun 22, 2012
@ Yawa-ti-de
Put this inbetween the header div and the other div

<div class="clear"></div>

My code removes the unnecessary div between the header and the other div by making "clear" a class of the next div and not a separate div.
Re: Help Needed!!! Content Appearing Behind Fixed Header by yawatide(f): 7:01pm On Jun 22, 2012
So, I am thinking that the actual issue at hand here is the number of characters and not the justification for using a particular approach. Of course, there are many ways to skin a cat. I will ask again:

^^^ Have you actually counted the number of characters b/w Dual's DIV clear, my BR clear and your code above?

What say you?
Re: Help Needed!!! Content Appearing Behind Fixed Header by TheAgent1: 7:47pm On Jun 22, 2012
set the height of the one you fixed, then do the clear:both; in css of div (divititis ...yes me too)

like so:

<div style="position:fixed; height:100px;"></div>
<div style="clear:both;"></div>
<div style="position:relative; height:100px;"></div>

powered by: www.nigerianwebhosts.com
Re: Help Needed!!! Content Appearing Behind Fixed Header by Nobody: 1:31pm On Jun 23, 2012
Thanks guys!!! I got it fixed.
Re: Help Needed!!! Content Appearing Behind Fixed Header by yawatide(f): 11:18am On Jun 24, 2012
^^^and so that others can learn from it, what exactly did you do to fix the issue?
Re: Help Needed!!! Content Appearing Behind Fixed Header by Nobody: 1:07pm On Jun 24, 2012
I put all my divs in a container and padded the container on top.

(1) (Reply)

Start Your Web Hosting Company With Whmcs Unlimited License / Best Ways To Attract Visitors To Your Website Without Spending A Dim / I Can Send 10000 Visitors Per Day To Your Website

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.