Results 1 to 5 of 5

Thread: opening a DIV

  1. #1
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Default opening a DIV

    I would like to open a div on my page from a link.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>DIV Display</title>
    <script type="text/javascript">
    function show(element) {
    	var el = document.getElementById(element);
    	el.style.display = "block";
    	}
    </script>
    </head>
    <body>
    <a href="#" onclick="show('myDivBlock')">Show DIV</a>
    <div id="myDivBlock" style="display:none;">
    	Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam quis augue. Ut quis ligula. Pellentesque nibh dolor,
    	commodo eu, dapibus congue, euismod id, nisi. Pellentesque iaculis placerat tellus. Nulla varius est tristique libero.
    	Ut sed dui. Praesent nunc. Nunc sit amet velit at lectus adipiscing tempus. Nulla lorem urna, tincidunt eget, fermentum
    	eu, vulputate sed, nunc. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
    </div>
    </body>
    </html>
    - Mike

  3. #3
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Default background color transparent

    txs a lot.

    is there a simple way to make the bg color of the div a bit transparent?(opacity)
    Only the bgcolor, not the text

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    is there a simple way to make the bg color of the div a bit transparent?(opacity)
    Only the bgcolor, not the text
    The CSS way of doing it makes the text change (transparent) as well. Use a background image, and make it transparent using a image-editing program.
    - Mike

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
  •