Search
 
SCRIPT & CODE EXAMPLE
 

CSS

dropdown size based on text

.dropbtn {
  background-color: #4CAF50;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  left: 0;
  display: none;
  background-color: #f9f9f9;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background-color: #f1f1f1
}

.dropdown:hover .dropdown-content {
  display: inline-block;
}

.dropdown:hover .dropbtn {
  background-color: #3e8e41;
}
Comment

PREVIOUS NEXT
Code Example
Css :: css cursor forbidden 
Css :: css letter spacing tight 
Css :: set css on parent element css 
Css :: css after on hover 
Css :: checkbox checked color change css 
Css :: bootstrap database table cdn 
Css :: border style 
Css :: css multiple selectors 
Css :: translate in 3d css 
Css :: deobfuscate css 
Css :: css span to right of div 
Css :: css border 
Css :: css 2 divs nebeneinander 
Css :: css height property 
Css :: nmap output ip only 
Css :: fonts for css 
Css :: button active css 
Css :: css flex cards 
Css :: chai assert 
Css :: cannot apply border radius to tr 
Css :: css rounded circle image 
Css :: codemirror resizable 
Css :: font weight numbers 
Css :: como fazer uma linha vertical no html 
Css :: Changing Image depending on Mobile or Desktop HTML & CSS 
Css :: css a little transparent 
Css :: bulma scss add custom colors 
Css :: how we use backdrop-filter css property 
Css :: animations css 
Css :: @font-face or font link 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =