Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS oval shape cut out from div
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/telOf.jpg" alt="goal"></p> <p>The above image is what i'm trying to create but am having some difficulties with the oval shape. An explanation:</p> <ul> <li>The menu bar is a div with a slight linear gradient (dark grey to transparent lighter grey)</li> <li>The company logo image has a transparent bg and will sit 'ontop' of the menu bar</li> <li>The oval cutout will need to match the oval of the logo and have a transparent gap between that will show the background colour (this changes on each page, orange is just an example)</li> </ul> <p>I've tried and failed many times with a radial gradient - I was able to get a circle cut out but couldn't work out how to make it oval and then couldn't get the linear gradient to work. See code:</p> <pre><code>.circle { height: 10em; background: radial-gradient(circle 50px at 50% 100%, transparent 50px, rgba(84, 82, 94, 0.8) 50px); background: -webkit-radial-gradient(50% 100%, circle, transparent 50px, rgba(84, 82, 94, 0.8) 50px); } </code></pre> <p>When the cutout shape and the gradient is sorted, the logo will be positioned over the top.</p> <p>Any suggestions or jsfiddle solutions would be appreciated, thanks!</p> <p>EDIT: jsfiddle <a href="http://jsfiddle.net/JazParkyn/fZWM4/" rel="nofollow noreferrer">here</a></p> <p>EDIT 2: Have solved the problem by changing the design slightly, thanks to those who replied. I wrote some jquery to solve this - when the coloured area scrolls out of view the oval border and header border will pick up the colour of the top section, instead of the transparency.</p> <p><img src="https://i.stack.imgur.com/oDiVw.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload