Results 1 to 2 of 2

Thread: Help with CSS and jQuery lightbox

  1. #1
    Join Date
    Aug 2009
    Location
    London
    Posts
    93
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Default Help with CSS and jQuery lightbox

    Hi,

    I've created a lightbox slideshow using jQuery and now I'm having problems styling the css on the caption (title="my caption"), please can someone help me?

    Here is part of the code that relates to the lightbox
    HTML Code:
    <div class="column4"> 
            <h2><a href="images/web/w1.jpg" rel="lightbox[web]" title="my caption"> DIGITAL MEDIA</a> 
              <a href="images/web/w2.jpg" rel="lightbox[web]" title="my caption"></a> 
              </h2>
    </div>
    Here is the lightbox css:
    Code:
    #lightbox{position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
    #lightbox img{ width: auto; height: auto;}
    #lightbox a img{ border: none; }
    
    #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
    #imageContainer{ padding: 10px; }
    
    #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
    #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
    #imageContainer>#hoverNav{ left: 0;}
    #hoverNav a{ outline: none;}
    
    #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
    #prevLink { left: 0; float: left;}
    #nextLink { right: 0; float: right;}
    #prevLink:hover, #prevLink:visited:hover { background: url(images/prevlabel.gif) left 15% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(images/nextlabel.gif) right 15% no-repeat; }
    
    #imageDataContainer{
    	background-color: #fff;
    	margin: 0 auto;
    	line-height: 1.4em;
    	overflow: auto;
    	width: 100%;
    	font-family: "Times New Roman", Times, serif;
    	font-size: 9px;
    	color: #00FF00;
    }
    
    #imageData{padding:0 10px; color: #666; }
    #imageData #imageDetails{ width: 70%; float: left; text-align: left; }	
    #imageData #caption{ font-weight: bold; }
    #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em;}			
    #imageData #bottomNavClose{ width: 66px; float: right;  padding-bottom: 0.7em; outline: none;}	 	
    
    #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }
    So two questions:
    1) You can see that #imageDataContainer text is set to bright green and 9px - but it is appearing in #cccccc (grey) and more like 14px in size.
    Why won't it appear the style in #imageDataContainer?

    2) Can someone please explain how all the lightbox css (as above) styles everything, when I can't see any reference to it in the HTML? I assume it refers to it in the jQuery scripts?

    Thanks in anticipation.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    CSS.. Cascading Style Sheet. Cascading as in a downwards motion.

    CSS declarations use what comes LAST as the method to use.

    Code:
    #imageData{padding:0 10px; color: #666; }
    is over writing #imageDataContainer.

    Change your gray (#666) here
    and add font size to the caption data:

    Code:
    #imageData #caption{ font-weight: bold; }
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    jhatter (04-23-2010)

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
  •