SlideShare uma empresa Scribd logo
1 de 4
how can i horizontally minimize this menu http://codepen.io/anon/pen/bZWOQk please wrap
menu in a div.
the div wrap should shrink if minimized horizontally pls.
Solution
body {
background: orange;
}
* {
margin: 0;
padding: 0;
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}
nav {
position: absolute;
top: 50%;
left: 50%;
width: 300px;
background: #3a3a3a;
font-size: 16px;
transform: translateX(-50%) translateY(-50%);
box-shadow: 0 0 10px rgba(0,0,0,0.9);
}
nav input[type=checkbox] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
display: block;
cursor: pointer;
}
nav ul {
margin: 0;
padding: 0;
}
nav a {
display: block;
padding: 15px 20px;
color: #fff;
text-decoration: none;
}
nav li {
position: relative;
float: left;
width: 100%;
list-style: none;
color: #fff;
transition: 0.5s;
border-top: 1px solid #555;
}
nav li:first-child {
border-top: none;
}
nav ul > li.sub > a:after {
position: relative;
float: right;
content: '+';
margin-top: -0.1em;
font-size: 1.2em;
vertical-align: middle;
transition: 0.5s;
}
nav li:hover {
background: #4096ee !important;
}
nav .submenu {
max-height: 0;
overflow: hidden;
border-top: none;
transition: max-height 0.5s ease-in-out;
}
nav input[type=checkbox]:checked ~ .submenu {
max-height: 999px;
border-top: 1px solid #555;
}
nav input[type=checkbox]:checked ~ a:after {
transform: rotate(45deg);
}
nav .submenu a {
padding: 10px 20px;
}
nav .submenu li {
list-style-position: inside;
list-style-type: square;
background: #333;
}
nav .submenu li.sub {
list-style: none;
}
nav .submenu li li {
background: #3a3a3a;
}
nav .submenu li li li {
background: #2a2a2a;
}
how can i horizontally minimize this menu http---codepen-io-anon-pen-b.docx

Mais conteúdo relacionado

Semelhante a how can i horizontally minimize this menu http---codepen-io-anon-pen-b.docx

Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.no
Hannee92
 
Html standards presentation
Html standards presentationHtml standards presentation
Html standards presentation
Tiago Cardoso
 
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docxuntitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
dickonsondorris
 
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docxExpress HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
ssuser454af01
 
eBusiness Engineering Responsive Web Design Part 2
eBusiness Engineering Responsive Web Design Part 2eBusiness Engineering Responsive Web Design Part 2
eBusiness Engineering Responsive Web Design Part 2
pawelskowronek
 
Chapter 6 TemplateWeek 6csshomework.css html {.docx
Chapter 6 TemplateWeek 6csshomework.css  html {.docxChapter 6 TemplateWeek 6csshomework.css  html {.docx
Chapter 6 TemplateWeek 6csshomework.css html {.docx
robertad6
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)
makarnalar
 

Semelhante a how can i horizontally minimize this menu http---codepen-io-anon-pen-b.docx (20)

FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 
Dynamic progress bar
Dynamic progress barDynamic progress bar
Dynamic progress bar
 
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
Source Code Halaman Web Radio Stremaing [RAMEN RADIO]
 
Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.no
 
Html standards presentation
Html standards presentationHtml standards presentation
Html standards presentation
 
This is a test
This is a testThis is a test
This is a test
 
Slider goymon
Slider goymonSlider goymon
Slider goymon
 
Theme04
Theme04Theme04
Theme04
 
Horario
HorarioHorario
Horario
 
Theme02
Theme02Theme02
Theme02
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSS
 
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docxuntitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
untitled folder 6.DS_Store__MACOSXuntitled folder 6._.DS_.docx
 
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docxExpress HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
Express HolidaysExpress Holidaysabout.htmlHomeAbout UsDestin.docx
 
Theme03
Theme03Theme03
Theme03
 
Simplifying CSS With Sass
Simplifying CSS With SassSimplifying CSS With Sass
Simplifying CSS With Sass
 
css-note.pptx
css-note.pptxcss-note.pptx
css-note.pptx
 
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (NSWG Version)
 
eBusiness Engineering Responsive Web Design Part 2
eBusiness Engineering Responsive Web Design Part 2eBusiness Engineering Responsive Web Design Part 2
eBusiness Engineering Responsive Web Design Part 2
 
Chapter 6 TemplateWeek 6csshomework.css html {.docx
Chapter 6 TemplateWeek 6csshomework.css  html {.docxChapter 6 TemplateWeek 6csshomework.css  html {.docx
Chapter 6 TemplateWeek 6csshomework.css html {.docx
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)
 

Mais de hamblymarta

Choose all that apply- Which of the following is something that all ce.docx
Choose all that apply- Which of the following is something that all ce.docxChoose all that apply- Which of the following is something that all ce.docx
Choose all that apply- Which of the following is something that all ce.docx
hamblymarta
 
Case Study- Data-Driven Transformation of Springfield's Police Force S.docx
Case Study- Data-Driven Transformation of Springfield's Police Force S.docxCase Study- Data-Driven Transformation of Springfield's Police Force S.docx
Case Study- Data-Driven Transformation of Springfield's Police Force S.docx
hamblymarta
 
Can you please help me answer these two multiple choice questions- Tha.docx
Can you please help me answer these two multiple choice questions- Tha.docxCan you please help me answer these two multiple choice questions- Tha.docx
Can you please help me answer these two multiple choice questions- Tha.docx
hamblymarta
 
can someome please write the init method please This interface defines.docx
can someome please write the init method please This interface defines.docxcan someome please write the init method please This interface defines.docx
can someome please write the init method please This interface defines.docx
hamblymarta
 

Mais de hamblymarta (20)

Choose a piece of children's-adolescent media from any era and analyze.docx
Choose a piece of children's-adolescent media from any era and analyze.docxChoose a piece of children's-adolescent media from any era and analyze.docx
Choose a piece of children's-adolescent media from any era and analyze.docx
 
Complete parts (a) and (b) below- The number of dogs per household in.docx
Complete parts (a) and (b) below- The number of dogs per household in.docxComplete parts (a) and (b) below- The number of dogs per household in.docx
Complete parts (a) and (b) below- The number of dogs per household in.docx
 
Comider a pond or tiver adfacent to a higpo iawn in Arrica- The water.docx
Comider a pond or tiver adfacent to a higpo iawn in Arrica- The water.docxComider a pond or tiver adfacent to a higpo iawn in Arrica- The water.docx
Comider a pond or tiver adfacent to a higpo iawn in Arrica- The water.docx
 
Combining estimates with projections of likely events such as turnover.docx
Combining estimates with projections of likely events such as turnover.docxCombining estimates with projections of likely events such as turnover.docx
Combining estimates with projections of likely events such as turnover.docx
 
Christine Danes has asked Dave and Mike to help her move into a new ap.docx
Christine Danes has asked Dave and Mike to help her move into a new ap.docxChristine Danes has asked Dave and Mike to help her move into a new ap.docx
Christine Danes has asked Dave and Mike to help her move into a new ap.docx
 
Cody is trying to explain to Sarah that one advantage enjoyed by plant.docx
Cody is trying to explain to Sarah that one advantage enjoyed by plant.docxCody is trying to explain to Sarah that one advantage enjoyed by plant.docx
Cody is trying to explain to Sarah that one advantage enjoyed by plant.docx
 
Combining Prehension and Propulsion- The Foot of Ardipithecus ramidus.docx
Combining Prehension and Propulsion- The Foot of Ardipithecus ramidus.docxCombining Prehension and Propulsion- The Foot of Ardipithecus ramidus.docx
Combining Prehension and Propulsion- The Foot of Ardipithecus ramidus.docx
 
Code needed in C++ Input and formatted output- Right-facing arrow Give.docx
Code needed in C++ Input and formatted output- Right-facing arrow Give.docxCode needed in C++ Input and formatted output- Right-facing arrow Give.docx
Code needed in C++ Input and formatted output- Right-facing arrow Give.docx
 
Class problem 5 -Animal personality- has been defined as consistent di.docx
Class problem 5 -Animal personality- has been defined as consistent di.docxClass problem 5 -Animal personality- has been defined as consistent di.docx
Class problem 5 -Animal personality- has been defined as consistent di.docx
 
Class Discussion - Guest Speaker - Laura Sonderup Q1- From your exper.docx
Class Discussion - Guest Speaker - Laura Sonderup Q1-  From your exper.docxClass Discussion - Guest Speaker - Laura Sonderup Q1-  From your exper.docx
Class Discussion - Guest Speaker - Laura Sonderup Q1- From your exper.docx
 
Choose all that apply- Which of the following proteins would have an E.docx
Choose all that apply- Which of the following proteins would have an E.docxChoose all that apply- Which of the following proteins would have an E.docx
Choose all that apply- Which of the following proteins would have an E.docx
 
Choose all that apply- Which of the following is something that all ce.docx
Choose all that apply- Which of the following is something that all ce.docxChoose all that apply- Which of the following is something that all ce.docx
Choose all that apply- Which of the following is something that all ce.docx
 
Choose every statement that is true about the cytoplasm- Cytoplasm can.docx
Choose every statement that is true about the cytoplasm- Cytoplasm can.docxChoose every statement that is true about the cytoplasm- Cytoplasm can.docx
Choose every statement that is true about the cytoplasm- Cytoplasm can.docx
 
Case Study- Data-Driven Transformation of Springfield's Police Force S.docx
Case Study- Data-Driven Transformation of Springfield's Police Force S.docxCase Study- Data-Driven Transformation of Springfield's Police Force S.docx
Case Study- Data-Driven Transformation of Springfield's Police Force S.docx
 
Charles Darwin used many different aspects of the natural world as evi.docx
Charles Darwin used many different aspects of the natural world as evi.docxCharles Darwin used many different aspects of the natural world as evi.docx
Charles Darwin used many different aspects of the natural world as evi.docx
 
Chapter 2 notes various problems in the use of ratios and metrics- Whi.docx
Chapter 2 notes various problems in the use of ratios and metrics- Whi.docxChapter 2 notes various problems in the use of ratios and metrics- Whi.docx
Chapter 2 notes various problems in the use of ratios and metrics- Whi.docx
 
Case -#2- Royal Bank of Canada v- Head West Energy Inc-- 2007 ABQB 154.docx
Case -#2- Royal Bank of Canada v- Head West Energy Inc-- 2007 ABQB 154.docxCase -#2- Royal Bank of Canada v- Head West Energy Inc-- 2007 ABQB 154.docx
Case -#2- Royal Bank of Canada v- Head West Energy Inc-- 2007 ABQB 154.docx
 
care plannursing diagnose risk for evidenced by prostatis nursing dia.docx
care plannursing diagnose risk for evidenced by prostatis  nursing dia.docxcare plannursing diagnose risk for evidenced by prostatis  nursing dia.docx
care plannursing diagnose risk for evidenced by prostatis nursing dia.docx
 
Can you please help me answer these two multiple choice questions- Tha.docx
Can you please help me answer these two multiple choice questions- Tha.docxCan you please help me answer these two multiple choice questions- Tha.docx
Can you please help me answer these two multiple choice questions- Tha.docx
 
can someome please write the init method please This interface defines.docx
can someome please write the init method please This interface defines.docxcan someome please write the init method please This interface defines.docx
can someome please write the init method please This interface defines.docx
 

Último

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Último (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

how can i horizontally minimize this menu http---codepen-io-anon-pen-b.docx

  • 1. how can i horizontally minimize this menu http://codepen.io/anon/pen/bZWOQk please wrap menu in a div. the div wrap should shrink if minimized horizontally pls. Solution body { background: orange; } * { margin: 0; padding: 0; font-family: 'Roboto', sans-serif; box-sizing: border-box; } nav { position: absolute; top: 50%; left: 50%; width: 300px; background: #3a3a3a; font-size: 16px; transform: translateX(-50%) translateY(-50%); box-shadow: 0 0 10px rgba(0,0,0,0.9); } nav input[type=checkbox] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
  • 2. display: block; cursor: pointer; } nav ul { margin: 0; padding: 0; } nav a { display: block; padding: 15px 20px; color: #fff; text-decoration: none; } nav li { position: relative; float: left; width: 100%; list-style: none; color: #fff; transition: 0.5s; border-top: 1px solid #555; } nav li:first-child { border-top: none; } nav ul > li.sub > a:after { position: relative; float: right; content: '+'; margin-top: -0.1em; font-size: 1.2em; vertical-align: middle; transition: 0.5s; } nav li:hover { background: #4096ee !important; } nav .submenu { max-height: 0;
  • 3. overflow: hidden; border-top: none; transition: max-height 0.5s ease-in-out; } nav input[type=checkbox]:checked ~ .submenu { max-height: 999px; border-top: 1px solid #555; } nav input[type=checkbox]:checked ~ a:after { transform: rotate(45deg); } nav .submenu a { padding: 10px 20px; } nav .submenu li { list-style-position: inside; list-style-type: square; background: #333; } nav .submenu li.sub { list-style: none; } nav .submenu li li { background: #3a3a3a; } nav .submenu li li li { background: #2a2a2a; }