Results 1 to 5 of 5

Thread: Transparent image (logo) on top of of random image

  1. #1
    New user
    Join Date
    08-21-09.
    Posts
    7

    Default Transparent image (logo) on top of of random image

    Hello to the TL community,

    I'm new to this CMS and have tried and tested probably the same number of different CMS systems in the past years that have ever existed starting from Postnuke hahaha.

    I need some assistance for a small problem.
    I have added the header module with a random image so that each page refresh gives a different header image. This is working perfectly but I would like to add a company logo (transparent gif) on top of the image. Instead of adding this logo to each image in photoshop would it be possible (and how) to add it via CSS. I've tried putting in the header module a class ID "logo" and then in the css following code:
    Code:
    #logo  {
    	background: url('../img/logo.gif') no-repeat;
    	height: 100px;
    }
    ... but it doesn't show up. Maybe it can't work or maybe I'm doing something wrong but my knowledge is too short to sort this out on my own.

    Many thanks for any help.

  2. #2
    Official Contao Team
    Join Date
    06-10-09.
    Location
    Stuttgart, Germany
    Posts
    68

    Default Re: Transparent image (logo) on top of of random image

    Hi Alex,

    try to write this:
    Code:
    #logo  {
       position:absolute;
       top:30px;
       left:100px;
       height: 100px;
       width:300px;
       z-index:1000;
    }
    to get the div #logo to an absolute position and z-index to bring it to the front.

    Then create a custom html modul with:
    Code:
    <div id="logo">
    [img]tl_files/pathtotheimage.gif[/img]
    </div>
    you need to make your values for coordinates
    ---------------------------------------------------
    kind regards planepix

    Official Contao team member - Official Contao partner
    workshop contao conference site 2011
    workshop contao conference site 2012

  3. #3
    New user
    Join Date
    08-21-09.
    Posts
    7

    Default Re: Transparent image (logo) on top of of random image

    Thank you planepix for the help but I didn't manage to get it working. :?

    I made the stylesheet as you said but I can't make a Custom module with the code inside the header because the header has it's own module with the random image script.
    The only thing I have managed is that the logo appears beneath the random image but I need it in top (not above). Maybe I have to edit the header template or create my own template just for the header but I'm afraid of breaking everything apart and having to do a reinstall :|

  4. #4
    Official Contao Team
    Join Date
    06-10-09.
    Location
    Stuttgart, Germany
    Posts
    68

    Default Re: Transparent image (logo) on top of of random image

    Hi Alex,

    make a Module for div #logo as custom html code and place it as second module in page layout section to head line before your module for the random images.

    Frontend-Modules
    • Module ------------------------ Column
      logo ----------------------------Header
      random-images -------------- Header
    ---------------------------------------------------
    kind regards planepix

    Official Contao team member - Official Contao partner
    workshop contao conference site 2011
    workshop contao conference site 2012

  5. #5
    New user
    Join Date
    08-21-09.
    Posts
    7

    Default Re: Transparent image (logo) on top of of random image

    Hi planepix,

    thank you for your help but without any new changes now it's working. I think maybe it was a cache problem because last time I posted in the forum it didn't work and now it's working perfectly without changes. Now I just have to sort out the exact position. Next task is getting the horizontal menu to work changing the active tab depending on the page but that will be a new question.

    As I said, thank you for your support.
    mfG
    Alex

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
  •