Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2019
    Posts
    11

    Default How to make iframe contents background transparent

    Hi.... can anyone help, I have a page containing an iframe placeholder with the following code (ie in HTML cody (body)

    <iframe name=head src=./trans-test.htm width=100% height=100%
    scrolling=no frameborder=0 marginheight=0 marginwidth=0 allowtransparency="true"></iframe>

    The ./trans-test.htm is a page that just has a line of text ie "hello world"

    Is there a way I can get the text in the iframe to have a transparent background. I seem to just get the text with a white background

  2. #2
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,916

    Default Re: How to make iframe contents background transparent

    Hi Web-it,

    I'd forget the
    allowtransparency="true"
    bit.

    When you create the page that appears within your root page as a placeholder, select both the page background and pasteboard backgrounds to no fill. Publish.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Question Re: How to make iframe contents background transparent

    Quote Originally Posted by Web-it View Post
    Hi.... can anyone help, I have a page containing an iframe placeholder with the following code (ie in HTML cody (body)
    <iframe name=head src=./trans-test.htm width=100% height=100%
    scrolling=no frameborder=0 marginheight=0 marginwidth=0 allowtransparency="true"></iframe>
    The ./trans-test.htm is a page that just has a line of text ie "hello world"
    Is there a way I can get the text in the iframe to have a transparent background. I seem to just get the text with a white background
    Can you explain further why you need this?

    If it is purely text, use a Text Area.
    If you are needing to control it, place in a Layer and set as a pop-up.
    If it is more than just text you could append the selection into an empty DIV using jQuery.

    I have play with CSS code using background-color: transparent; & opacity: 0; to no benefit.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Oct 2019
    Posts
    11

    Default Re: How to make iframe contents background transparent

    Quote Originally Posted by Egg Bramhill View Post
    Hi Web-it,

    I'd forget the bit.

    When you create the page that appears within your root page as a placeholder, select both the page background and pasteboard backgrounds to no fill. Publish.


    Arh.. I didn't think to set the pasteboard background to no fill.... that works a treat now.... thanks so much for your help!!

  5. #5
    Join Date
    Oct 2019
    Posts
    11

    Default Re: How to make iframe contents background transparent

    Quote Originally Posted by Acorn View Post
    Can you explain further why you need this?

    If it is purely text, use a Text Area.
    If you are needing to control it, place in a Layer and set as a pop-up.
    If it is more than just text you could append the selection into an empty DIV using jQuery.

    I have play with CSS code using background-color: transparent; & opacity: 0; to no benefit.

    Acorn


    Yes I didn't want to confuse my question.. but to explain a little further..

    On the root page I have another Iframe placeholder that links to a full page slide show, I needed the second iframe to show a second text slide show overlaid on the first.
    I need the timings of the 2 slideshows to be different, so that the text is out of sync with the underlying slideshow. (giving a randomness over time) I'll need to adjust the text content regularly so it's also easier to organize as a separate xara file.

    I didn't realize that I needed to set the pasteboard (of the Iframe target) to transparent...now that's done it works just how I wanted it to.

    Thanks very much for the reply... this forum is fantastic (especially for those of us head scratchers who have no knowledge of code)

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •