0

I had achieved the sliding form using jquery but when i click on the link, i wish to have a form border like this:

But when i am putting a border for both it is looking like separate borders.

https://drive.google.com/file/d/0By25CEM_KEOiWU42SFhsaTVmZWc/edit?usp=sharing

Here is the code :

http://jsfiddle.net/nikunj2512/MgcDU/8360/

But i am not able to achieve this kind of border effect which surrounds the link & the form.

Please help me.

Nikunj Aggarwal
  • 423
  • 2
  • 7
  • 18

1 Answers1

0

First I changed the #add click function of your jQuery script like this: [added css to the u286 id, then remove it later]

$('#add').click(function () {
    if ($('#sliding-form').is(":hidden")) {
        $('#sliding-form').slideDown('slow');
        $('#u286').css({
            'border':'1px solid #000',
            'border-bottom-color':'white'
        });
    } else {
        $('#sliding-form').slideUp('slow');
        $('#u286').removeAttr('style');
    }
});

EDIT: I changed a bit around in your css file. I overlaid the #bottom-header div on top of the #sliding-form div to make sure there is that white gap. Here is what I changed:

  1. Added position: relative; to the .container class,

  2. Added #bottom-header { position: absolute; z-index:10;},

  3. Added background:#fff; to #u286,

  4. Removed .mouseOver {background:#fff;} Since it doesn't affect anything,

  5. Changed top: 30px; to top: 26px; in #sliding-form.

Hopefully this is more to your liking!

updated jsFiddle

Useful StackOverflow question / answer on overlays

Community
  • 1
  • 1
Blundering Philosopher
  • 6,245
  • 2
  • 43
  • 59
  • Yes it helped but it was not was i am trying to achieve. Did You see in stackoverflow the three tabs `active`, `oldest`, `votes`, how the border coming around them, i want something like this. Please help me out. Thanks – Nikunj Aggarwal Dec 29 '13 at 14:33
  • Good call! I edited my post - hopefully this is more like what you were looking for! – Blundering Philosopher Dec 29 '13 at 18:59