5 Replies - 489 Views - Last Post: 18 February 2011 - 02:10 AM

#1 cs_gal  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 22-October 10

A gap showing in between divs

Posted 16 February 2011 - 01:36 PM

I have made a page, in which there appears a white gap between the top banner and black colored navigation bar only in IE. I want to get rid of it. Please check it out here
Is This A Good Question/Topic? 0
  • +

Replies To: A gap showing in between divs

#2 init.d.httpd  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 30
  • View blog
  • Posts: 132
  • Joined: 02-February 11

Re: A gap showing in between divs

Posted 16 February 2011 - 02:00 PM

What did you create the green image with? it's not showing at all in firefox and when I open it in photoshop the bottom of it is black.

I think that image needs to be recreated.

Also, don't sepereate your main navigation with a bunch of non breaking spaces, put them in an unordered list or div's or something without 500
nbsp;
's
Was This Post Helpful? 1
  • +
  • -

#3 scentauri  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 63
  • Joined: 16-February 11

Re: A gap showing in between divs

Posted 16 February 2011 - 02:46 PM

I had the same problem. Getting rid of the space or break between the <div> tags will solve the problem. Good luck!
Was This Post Helpful? 0
  • +
  • -

#4 -=m0n1k3r=-  Icon User is offline

  • D.I.C Regular

Reputation: 16
  • View blog
  • Posts: 250
  • Joined: 10-February 10

Re: A gap showing in between divs

Posted 17 February 2011 - 12:31 PM

I know this isn't in the site check forum but I noticed that the title of your page is "Untitled Document" and it's probably a good idea to change that.
Was This Post Helpful? 0
  • +
  • -

#5 cs_gal  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 31
  • Joined: 22-October 10

Re: A gap showing in between divs

Posted 18 February 2011 - 01:05 AM

Thanks a lot everyone.

init.d.httpd I have put the items in a <ul> tag, thanks for suggesting. I solved my problem by removing the line height for menu items and replacing it with padding for each item. The line height was more than the nav bar, so there was a white space.

There is another thing I would like to know that is, If we have a parent div and two divs inside it and we want to position those two divs inside the parent div, relative to one another (not relative to parent div), what will be value for position attribute for each div. The values i used didn't seem to work, they were

<div id="parent">
<div id="first-child" style="position:relative;"></div>
<div id="second-child" style="position:relative; top:250;"></div><!--I want this div to appear 250px below the first child-->
</div>



The parent div is center aligned, and has a proper position, so i want the child div to remain inside it.
Was This Post Helpful? 0
  • +
  • -

#6 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

Reputation: 192
  • View blog
  • Posts: 725
  • Joined: 22-December 08

Re: A gap showing in between divs

Posted 18 February 2011 - 02:10 AM

Your above code worked for me. The first div was 250px below the first.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1