-4

I want to make a closeable banner like this one at the top:

https://i.stack.imgur.com/t2m9U.jpg

using only html, css, and javascript

Maglor
  • 47
  • 2
  • 11
  • welcome to stackoverflow. please show codes of what you have tried. we are not here to do eachotehrs' home work. we can help in errors or problems you have faced. – Sina R. Nov 16 '14 at 13:41

1 Answers1

1

Check this bootstrap example: http://www.bootply.com/91822

Or this fiddle I just quickly put together: http://jsfiddle.net/foxu9o9d/ the JS goes along the lines of:

var btn = document.querySelector('#btn-dismiss');

btn.addEventListener("click", function(){
    var alert = document.querySelector('#fixed-alert');
    alert.style.display = 'none';
});
anmonteiro
  • 210
  • 5
  • 9