# Collapse expand icon

**URL:** <https://www.phphelp.com/t/collapse-expand-icon/29171>\
**Category:** HTML & CSS\
**Created:** [June 2, 2019, 7:18am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171 "2019-06-02T07:18:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 2, 2019, 7:18am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/1 "2019-06-02T07:18:54Z")

</div>

I need to create collapse expand icon as in attached image , please help

 ![style](https://www.phphelp.com/uploads/default/original/2X/2/283ec90bdf16827e2464d159c1433ee1c6aa2e74.png)

---

<div class="post-metadata">

**Author:** ![JimL](https://www.phphelp.com/user_avatar/www.phphelp.com/jiml/32/1842_2.png) [@JimL](https://www.phphelp.com/u/JimL)\
**Post date:** [June 2, 2019, 5:23pm UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/2 "2019-06-02T17:23:51Z")

</div>

More info needed. If you were to post this to a freelancer he would most likely give you the actual arrow icon, which I assume is not what you want.

---

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 2, 2019, 6:29pm UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/3 "2019-06-02T18:29:25Z")

</div>

I don’t have the icon , what is it called panel or div or what ?

---

<div class="post-metadata">

**Author:** ![johnphpnewb](https://www.phphelp.com/user_avatar/www.phphelp.com/johnphpnewb/32/2219_2.png) [@johnphpnewb](https://www.phphelp.com/u/johnphpnewb)\
**Post date:** [June 5, 2019, 11:49pm UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/4 "2019-06-05T23:49:23Z")

</div>

maybe it is css code. making a triangle is easy and applying a linear-gradient is equally easy.  
learn css and make your own.

```auto
https://css-tricks.com/books/volume-i/how-to-make-a-triangle/
```

---

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 6, 2019, 2:27pm UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/5 "2019-06-06T14:27:10Z")

</div>

thank you for your help  
after that how can make it collapse & expand

---

<div class="post-metadata">

**Author:** ![johnphpnewb](https://www.phphelp.com/user_avatar/www.phphelp.com/johnphpnewb/32/2219_2.png) [@johnphpnewb](https://www.phphelp.com/u/johnphpnewb)\
**Post date:** [June 7, 2019, 8:59am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/6 "2019-06-07T08:59:26Z")

</div>

javascript is your best bet. since height is obvious, then specify width: 0px;  
onclick change css width to whatever you want and display inline-block or block

it will work like a js/css modal.

---

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 7, 2019, 10:12am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/7 "2019-06-07T10:12:09Z")

</div>

thanks can you please provide me the steps or code as you sent before

---

<div class="post-metadata">

**Author:** ![johnphpnewb](https://www.phphelp.com/user_avatar/www.phphelp.com/johnphpnewb/32/2219_2.png) [@johnphpnewb](https://www.phphelp.com/u/johnphpnewb)\
**Post date:** [June 7, 2019, 10:23am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/8 "2019-06-07T10:23:26Z")

</div>

here are some links that illustrate similar functionality:  
[https://www.w3schools.com/howto/howto\_js\_collapse\_sidebar.asp](https://www.w3schools.com/howto/howto_js_collapse_sidebar.asp)  
[https://materializecss.com/sidenav.html](https://materializecss.com/sidenav.html)  
[https://alligator.io/css/collapsible/](https://alligator.io/css/collapsible/)

this may require a little hard work for you. but if you keep it simple, then it shouldn’t cost too much time. ideally, you want to build the tabbed elements first. then you can isolate the sidebar with the icon. then get the sidebar collapsing with js, then include the working tabbed elements into the collapsable sidebar. as a whole, it should be working.

you could access the collapsable menu using document.getElementById(‘your\_id’).style.width=‘100%’;  
the icon will also use transform to build the little outline of the triangle. so a div with a border solid 1px and a tranform applied to change the angle of the top and bottom borders.

---

<div class="post-metadata">

**Author:** ![johnphpnewb](https://www.phphelp.com/user_avatar/www.phphelp.com/johnphpnewb/32/2219_2.png) [@johnphpnewb](https://www.phphelp.com/u/johnphpnewb)\
**Post date:** [June 7, 2019, 10:37am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/9 "2019-06-07T10:37:21Z")

</div>

about the icon: where did you get this navigation menu?  
if this is part of an online website, then just look at the source code to see what they are doing. it could be an image or css or both. peek at the source code if you can do so.

---

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 11, 2019, 11:25am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/10 "2019-06-11T11:25:54Z")

</div>

Thank you for your help & support , icon was on web at url

> **[Bootstrap 4 Accordion with Plus Minus Icons](https://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=accordion-with-plus-minus-icon)**
>
> View the live example as well as try and test it using the online HTML editor.

---

<div class="post-metadata">

**Author:** ![eng\_adel273](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/49beb7/32.png) [@eng\_adel273](https://www.phphelp.com/u/eng_adel273)\
**Post date:** [June 11, 2019, 11:29am UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/11 "2019-06-11T11:29:21Z")

</div>

Please help I need to make circle animated as in this topic

> **[LoadingBar.js / Flexible JS Progress Bar Library](https://loading.io/progress/)**
>
> LoadingBar is a SVG-based, flexible and easy-to-use progress bar library

I followed the steps , but the circle always static with value

---

<div class="post-metadata">

**Author:** ![johnphpnewb](https://www.phphelp.com/user_avatar/www.phphelp.com/johnphpnewb/32/2219_2.png) [@johnphpnewb](https://www.phphelp.com/u/johnphpnewb)\
**Post date:** [June 11, 2019, 2:37pm UTC](https://www.phphelp.com/t/collapse-expand-icon/29171/12 "2019-06-11T14:37:16Z")

</div>

Hello, this post is really a dead-end at this point. you can learn how to do this yourself. Noone can help you further. You can always post in the freelance section to hire someone to assist you.

The source code shows that the arrow is a png sprite.

```auto
https://www.tutorialrepublic.com/lib/images/toggle-button.png
https://www.tutorialrepublic.com/lib/images/toggle-button-hr.png
```

images should not be used if you are not the creator. I am a photographer, so i will never say that it is okay to use someones image without permission. make your own with a graphic editor, such as Gimp. Although, i wouldn’t use images at all these days. I would use a font or a clever css script.

the css is simple and you can view the source code to learn from it:

```auto
span class hide-preview-pane
view-source:https://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=accordion-with-plus-minus-icon

.show-preview-pane, .hide-preview-pane
view-source:https://www.tutorialrepublic.com/lib/bin/css/html-mode-2.3.css
<link rel="stylesheet" href="lib/bin/css/html-mode-2.3.css" />
```

The instructions for the css animation are included in the text of the linked page  
“Installation  
download loading bar JS and CSS files ( or, the zipped pack ) and include them in your HTML”

simply follow instructions or post at that forum. this uses a combination of css and JavaScript. Be sure that you link the css file as well as the JavaScript file. The css is necessary for the animation:

[https://stackoverflow.com/questions/29738787/filling-water-animation](https://stackoverflow.com/questions/29738787/filling-water-animation)

Again, i think that this topic is dead. So let it r.i.p.
