enketon.com - latest news
DatenschutzerklärungMai. 24. 2018
EmoticonsDez. 29. 2017
How to use?Dez. 28. 2017
Don't show results directlyDez. 27. 2017
Dec. 27. 2017

Floating text around vote-box

Sometimes it can be good to float your text around the vote-box. This makes your poll a real part of your website, without having big breaks or wordwraps in between.

This can easily be done by adding a little CSS code snippet to the HTML-code, what is shown in yellow in the box bellow.
<script>
function receiveMessage(event) { var message = event.data.split(':'); var eventName = message[0]; var iframes, len, i = 0; var senderDomains = ['http://www.enketon.com']; if (!Array.prototype.indexOf) {Array.prototype.indexOf = function(obj, start) { for (var i = (start || 0), j = this.length; i < j; i++) { if (this[i] === obj) { return i; } } return -1;}} if ( senderDomains.indexOf(event.origin) !== -1 && eventName === 'resize' ) { iframes = document.getElementsByTagName('iframe'); len = iframes.length; for (; i < len; i++) { if ( ( iframes[i].contentWindow || iframes[i].documentWindow ) == event.source) { iframes[i].style.height = message[1] + "px"; return; } } } } if ( window.addEventListener ) {window.addEventListener('message', receiveMessage, false); } else if (window.attachEvent)  {window.attachEvent('onmessage', receiveMessage); }
</script>

<iframe src="http://www.enketon.com/survey4.php?g=nul&p=1752" style="float: right;" id="responsive-iframe" scrolling="no" frameborder="0" width="320px"></iframe>

Please make sure not to copy the code from this box since other parameters will be wrong in your case!

  • If you want your vote-box on the left chose style=“float: left;”
  • If you want your vote-box on the right chose style=“float: right;”

 

Feel free to leave a comment:

Your Name:


Comment: