Search

Hi,

I'm new in xslt world. I would need to have a loyout in two columns in wich I have the immage on the left and the text on the right, and they are connected. And I have also a javascript to toggle immage. So my xslt code is:

<?xml version="1.0" encoding="UTF-8"?> ....

<script type="text/javascript">

                    function toggleSize(img){
                    if (parseInt(img.style.width) != 820){
                   img.style.width='820px';}
                    else{
                    img.style.width = '50%';
                    }
                    }
                    function showHideNote(noteId){
                    var note = document.getElementById(noteId);
                    if (note.className == 'hiddenNote'){
                    note.className='showingNote';
                    }
                    else{
                    note.className='hiddenNote';
                    }

                    return true;
                    }

                &lt;/script>

So how to align text and immage next to each other? Thanks a lot!!!

Layout is handled by CSS, not XSLT.

So you mean I have to create a new css file? I thought I could put css in xslt...

If you had an <xsl:text> element with your CSS code inside, you'd be able to include CSS...

But it depends how your XSLT templates are being generated to know if you can place your styling "inline" on the html element (not recommended) or added the the <head> section of your html page.

I think this is spam since it posted it twice.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details