html - Responsive circles with messy markup -


i'm building feature has 3 circles inside of container next each other. when began building feature thought drop circles flex container , when added media quires , resized page.

much despise not case..the circles went inside of container when started resize page noticed squishing! know because border-radius:50% circles need percentage , when pressed change there size bc fluid.

this issue prompted me think of solution prevent circles squishing. had idea of surrounding divs around circles possibly stop them squishing looked around see if had done before.

much liking found solution had posted on sto. modified solution meet own needs works fine there's small issue here, i'm not sure way makes markup look. messy messy messy! 

solution

 <!-- projects --> <div class="circles">    <div>        <div>            <div>                <div class="projects">                    <a href="#">projects</a>                </div>             </div>        </div>    </div>       <!-- -->    <div>        <div>            <div>                <div class="about">                    <a href="#">about</a>                </div>            </div>        </div>    </div>    <!-- contact -->    <div>        <div>            <div>                <div class="contact">                    <a href="#">contact</a>                </div>            </div>        </div>   </div> 

compared original markup there clear difference in less amount of divs

original

  <div class="gridrow">      <div class="griditem1">          <a href="#" id="projects">projects</a>         </div>       <div class="griditem2">         <a href="#" id="about">about</a>      </div>       <div class="griditem3">         <a href="#" id="contact">contact</a>      </div>        </div> 

i'm want figure way clean solution markup little more i'm not sure if there's way that..i don't want use svg want css solution. ideas?

fiddles here

squishing circles https://jsfiddle.net/kapena/vmt54cd0/

responsive circles https://jsfiddle.net/kapena/vmt54cd0/

try adding these griditem styles:

min-width:200px; width:200px; max-width:200px; min-height:200px; height:200px; max-height:200px; 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -