Contenteditable OuterHTML Ideas CSS Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Contenteditable OuterHTML Ideas CSS Tutorial

Contenteditable OuterHTML Ideas CSS Tutorial

Onto yesterdayโ€™s Contenteditable OuterHTML Ideas Mobile Tutorial we turn our attention to some aesthetics matters with this โ€œContenteditable OuterHTML Ideasโ€ web application. Yes, most of this involves CSS changes, such as those for those div elements โ€ฆ



<style>

div.indiv {

outline: 2px solid green;

outline-offset: 2px;

padding: 2 2 2 2;

border: 12px solid transparent;

border-image: -webkit-linear-gradient(45deg,pink,orange,fuchsia,cyan,lightgreen) 20 stretch;

font-weight: bold;

font-style: italic;

}

</style>

โ€ฆ for a โ€œhigh impactโ€ look. And then there are watermark changes โ€ฆ.



<style>

span {

transform: rotate(45deg);

font-family: Arial, Helvetica, sans-serif;

font-style: oblique;


}

</style>

And then there is a vague blurry subtle green radial gradient look applied to the background of that โ€œtable clone for watermarking purposesโ€ โ€ฆ



shadowtable=document.getElementById('mytable').outerHTML.replace('mytable', 'shadowtable').replace(' style="', ' style="position:absolute;top:' + shadowrect.top + 'px;left:' + shadowrect.left + 'px;opacity:0.5;z-index:-9; background: #75f547; background: -webkit-radial-gradient(center center, circle cover, rgba(117, 245, 71, 1), rgba(255, 255, 255, 0) 100%); background: radial-gradient(center center, circle cover, rgba(117, 245, 71, 1), rgba(255, 255, 255, 0) 100%);').replace(/\<td\>/g, '<td style="opacity:0.5;border: 1px solid transparent; vertical-align: middle; text-align: center;transform: rotate(45deg);font-size:' + fifty + 'px;"><span></span>');

All still in action together in thechanged proof of concept contenteditable_outerhtml_ideasโšซhtm webโœ‚application ideas.



Previous relevant Contenteditable OuterHTML Ideas Mobile Tutorial is shown below.

Contenteditable OuterHTML Ideas Mobile Tutorial

Contenteditable OuterHTML Ideas Mobile Tutorial

Developing yesterdayโ€™s Contenteditable OuterHTML Ideas Watermark Tutorial on this MacBook Air had us a bit neglectful of mobile platforms. This neglectfulness manifested itself in the usual โ€œwidthโ€ and โ€œheightโ€ dilemmas โ€ฆ

  • add a meta viewport tag, such as our โ€ฆ


    <meta id="myviewport" name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >

  • start using โ€œheightโ€ โ€œvhโ€ units ahead of โ€œ%โ€ units, supplementing the initial โ€œbodyโ€ element โ€ฆ


    <body onload=" tablehit();">

    <table border=10 id=mytable style="width:100%;height:91%;" title="Contenteditable outerHTML Ideas - RJM Programming - March, 2022">

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

    </table>

    <div id=dshadow></div>

    <div id=dkeys></div>

    </body>


    โ€ฆ with CSS โ€ฆ


    <style>

    body {

    min-height: 91vh;

    min-height: webkit-fill-available;

    }

    </style>


    โ€ฆ and Javascript โ€ฆ


    function tablehit() {

    //

    // other top blah blah blah

    //

    if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {

    document.getElementById('mytable').style.height='' + eval(-170 + screen.height) + 'px';

    } else {

    fifty='40';

    document.getElementById('mytable').style.height='91vh';

    }

    //

    // other bottom blah blah blah

    //

    }

โ€ฆ all in action together in thechanged proof of concept contenteditable_outerhtml_ideasโšซhtm webโœ‚application ideas.


Previous relevant Contenteditable OuterHTML Ideas Watermark Tutorial is shown below.

Contenteditable OuterHTML Ideas Watermark Tutorial

Contenteditable OuterHTML Ideas Watermark Tutorial

Am sure there are a few readers out there bemused by the use of a 3ร—3 table cell grid background to the โ€œContenteditable OuterHTML Ideasโ€ web application of yesterdayโ€™s Contenteditable OuterHTML Ideas Animation Tutorial. Well, it provides โ€ฆ

  • some structure โ€ฆ and today it provides โ€ฆ
  • some use โ€ฆ for adding a watermark explanatory piece of text regarding those animations

Well, a close clone of the original 3ร—3 table grid element hosts these watermarks. Yes, itโ€™s another โ€œoverlayโ€ scenario using โ€ฆ

  • position: absolute;
  • top: [via {origTable}.getBoundingClientRect().top]
  • left: [via {origTable}.getBoundingClientRect().left]
  • opacity: [lessThan1.0];

โ€ฆ all in action together in thechanged proof of concept contenteditable_outerhtml_ideasโšซhtm webโœ‚application ideas.


Previous relevant Contenteditable OuterHTML Ideas Animation Tutorial is shown below.

Contenteditable OuterHTML Ideas Animation Tutorial

Contenteditable OuterHTML Ideas Animation Tutorial

Today, we want to build on yesterdayโ€™s Contenteditable OuterHTML Ideas Primer Tutorialโ€˜s โ€ฆ

  • very early on โ€ฆ seeing how useful was โ€ฆ innerHTML for HTML elements with proper endtag arrangements
  • years later โ€ฆ seeing how useful was โ€ฆ outerHTML for piecing together content for inline HTML emails, for example
  • and later again โ€ฆ seeing how useful was โ€ฆ contenteditable=true for a CMS (content management system) feel to HTML elements with proper endtag arrangements

โ€ฆ with some โ€œsecond tierโ€ event driven ideas โ€ฆ

  • introduce td (table cell) โ€ฆ onclick logic โ€ฆ so as to facilitate optional โ€ฆ
  • CSS โ€ฆ animation functionality, partitioned from yesterdayโ€™s work via โ€ฆ
  • avoiding inherited event logic issues, as necessary, via โ€ฆ event.stopPropagation();

โ€ฆ all in action together in thechanged proof of concept contenteditable_outerhtml_ideasโšซhtm webโœ‚application ideas โ€ฆ


Previous relevant Contenteditable OuterHTML Ideas Primer Tutorial is shown below.

Contenteditable OuterHTML Ideas Primer Tutorial

Contenteditable OuterHTML Ideas Primer Tutorial

Javascript DOM (document object model) work can be very rewarding, and you can achieve a lot of client based webpage work in a very dynamic way using its techniques. Of the gobsmacking highlights we well remember โ€ฆ

  • very early on โ€ฆ seeing how useful was โ€ฆ innerHTML for HTML elements with proper endtag arrangements
  • years later โ€ฆ seeing how useful was โ€ฆ outerHTML for piecing together content for inline HTML emails, for example
  • and later again โ€ฆ seeing how useful was โ€ฆ contenteditable=true for a CMS (content management system) feel to HTML elements with proper endtag arrangements

โ€ฆ and weโ€™d like to condense that length of time for some potential readers interested in seeing these Javascript DOM stars all in action together in the one proof of concept web application. Its design is just a 3ร—3 grid table in the background with each table cell populated by div contenteditable content the user can change (ie. their content changes are reflected in the look of the div elements afterwards).

We also use the wonderful CSS calc() function as a precision HTML element placement tool that also may interest the user of our proof of concept contenteditable_outerhtml_ideasโšซhtml webโœ‚application ideas โ€ฆ

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *