WF-UNIT3
WF-UNIT3
• HTML) Use any element to open the dropdown content, e.g. a <span>, or a
<button> element.
• Use a container element (like <div>) to create the dropdown content and add
whatever you want inside of it.
• Wrap a <div> element around the elements to position the dropdown content
correctly with CSS.
• CSS) The .dropdown class uses position:relative, which is needed when we
want the dropdown content to be placed right below the dropdown button
(using position:absolute).
CSS Layout – Floating Elements