I need help how to slice a div in half when using clip-path polygon
So how to solve this i thought clip path polygon reshapes the entire thing but i was wrong it doesnt seem to do it and my web is overflowing
15 Replies
Why don't you build your half hexagons from half width divs? You would need to modify the polygon for the clip path, but it would solve the overflow.
Ok I will check it out
But I tried a different approach instead
Turned the bug into feat
A buggy feet
Also won't half width divs ruin the shape?
It would only be ruined if you don't adjust the clip path. Did you test my code?
Well yeah tried smillar method ones but it just broke the shape
Need to be perfect center
But yeah kinda of problem solved
I have actually deprecated the entire halfhexagon function
Turned bug into a feat
A buggy feet
π
Oh wait
Nooo it won't work
Gotta experiment tomorrow tired from learning js day 1
You tried "similar methods" but you did not try my exact code. Here is a demonstration using your code and mine. They produce the exact same shape. https://codepen.io/chooking/pen/poYVXMY
oh ok
let me try it then
π
brooooo
same problem what so ever
well its not fixable so forget it
well here is my solulu
welp what to do
What's the actual issue?
You don't want the horizontal scroll?
Have you looked into the
overflow
CSS style?
Can be useful on a container to control the scroll
It's a simpler way to tackle issues like this without having to mess around with lining up the background perfectly to the container and add new shapes etc which just complicates thingsWell I am a bit psychotic so I need everything perfect or I would get triggered
Well I don't want side scroll