Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I only show half of my div?

Tags:

html

css

I've got a button with 100px height, 100px width and a border radius of 100px. This makes a 360 degree circle, but I only want to hide half of it. I've searched for everything but I can't find it. Does anyone know how to do this?

Thanks!

like image 946
User Avatar asked Jun 08 '13 15:06

User


3 Answers

Make a parent div, add overflow: hidden; and position: relative; to it. In the child div, do position: relative; and top: -50px;

like image 166
designcise Avatar answered Sep 21 '22 05:09

designcise


By "hide half of it", what do you mean?

Do you want a semicircle?

width:100px;
height:50px;
border-radius:50px 50px 0 0;

Or something else? Please elaborate further and I can provide more options ;)

like image 29
Niet the Dark Absol Avatar answered Sep 21 '22 05:09

Niet the Dark Absol


You can put it in another div with height: 50px and overflow:hidden. That should do the trick.

like image 35
Sebastian Wramba Avatar answered Sep 21 '22 05:09

Sebastian Wramba