Small Space Between Divs

7 replies
  • WEB DESIGN
  • |
I need to remove a small space between two div elements. I have the picture below.



The HTML looks like this:
Code:
<div id="one"> 
  </div>
<div id="two">
  </div>
And the css is set to 0 on padding, margins, and borders.

If I move DIV two up a pixel, the shadows overlap and darken.

Any ideas here?

Thanks,
#divs #small #space
  • Profile picture of the author RichKent
    Would have to see the complete code. - post a link or the complete html/css.
    {{ DiscussionBoard.errors[3406917].message }}
  • Profile picture of the author jminkler
    Originally Posted by Big Squid View Post

    I need to remove a small space between two div elements. I have the picture below.



    The HTML looks like this:
    Code:
    <div id="one"> 
      </div>
    <div id="two">
      </div>
    And the css is set to 0 on padding, margins, and borders.

    If I move DIV two up a pixel, the shadows overlap and darken.

    Any ideas here?

    Thanks,
    if its a background image try setting negative value top margins ? have to see code.
    {{ DiscussionBoard.errors[3407133].message }}
  • Profile picture of the author SmartWeb
    Its because of the background image. It seems that the background image is light on one side and dark on other side. normally for these kind of effects , we need to take a background image which is few pixels in height, say 2 px, and then css is configured to repeat the image vertically..

    ping me on skype if still have the issue, smart-web-solutions
    {{ DiscussionBoard.errors[3408063].message }}
    • Profile picture of the author staciejortega
      Originally Posted by SmartWeb View Post

      Its because of the background image. It seems that the background image is light on one side and dark on other side. normally for these kind of effects , we need to take a background image which is few pixels in height, say 2 px, and then css is configured to repeat the image vertically..

      ping me on skype if still have the issue, smart-web-solutions
      yes it because of the background image i guess.. try to use background image not much dark on the other side.. but if you think the background image is not the problem, try to fix it with CSS (padding, margin, etc..)
      {{ DiscussionBoard.errors[3408570].message }}
  • {{ DiscussionBoard.errors[3408312].message }}
  • Profile picture of the author Steve Wells
    Looks like the gradient image your using is lighter on its top than on its bottom.

    So you need to make sure that the image matches perfectly on both ends or they will not match up properly no matter what you do with css code....

    That's more than likely your main issue, I believe....
    Signature
    Need Custom Graphics Work? - Message Me For A Design Quote!
    {{ DiscussionBoard.errors[3408397].message }}
  • Profile picture of the author mahesh2010
    Hi,
    Post link so that i can view the code,
    give background position for the div and adjust the position,
    if you have given height to the div then adjust the height of the div please post link for better solution
    {{ DiscussionBoard.errors[3408540].message }}

Trending Topics