0

I have the following markup for a drop down menu (http://jsfiddle.net/77f4m6n5/2/):

<a href="#" dropdown>Open
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
  </ul>
</a>
<div>
  Remaining Content
</div>

How can I, using CSS, make the UL inside the A tag to show over the remaining content and not push it down when it opens?

Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
  • why do you need Angular for this? you don't need any javascript.. – vsync Apr 23 '16 at 16:30
  • Is possible to do this only with CSS and click? I want the dropdown to open with click and not hover because of mobile. – Miguel Moura Apr 23 '16 at 16:40
  • You could give both the anchor tag and the div `position:absolute;` and add `margin-top:20px;` on the div. [Not a clean solution but it works](http://jsfiddle.net/77f4m6n5/4/). – Drew Kennedy Apr 23 '16 at 16:58
  • I googled `stackoverflow click dropdown css` and got great answers. why didn't you Google before opening a new question? If you could explain it to me convincingly I would pay you 100$. – vsync Apr 23 '16 at 19:02
  • Because most approaches are using Javascript / JQuery and I wanted some feedback on making this with Angular. That is why I used dropdown directive ... Maybe I wasn't clear about my question. – Miguel Moura Apr 27 '16 at 10:26

0 Answers0