Results 1 to 2 of 2

Thread: Lightbox "Floats Left" - div conflict?

  1. #1
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox "Floats Left" - div conflict?

    1) Script Title:
    Lightbox 2.0a

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:
    On my style sheet I have the following :


    body { margin:0; padding:0; font-family: Tahoma; color:#676767;line-height:13px; font-size:12px}
    div {float:left}
    a { color:#676767; text-decoration: underline; cursorointer}
    a:hover {text-decoration: none}
    form { margin:0px 0px 0px 0px; padding:0px 0px 0px 0px}
    br { line-height:13px}
    /*


    When I try to use the lightbox script on my site it seems to conflict with the following line. : div {float:left}

    and the following happens : http://www.djallf.com/kostar/portfolio.html

    is there a workaround I can do with the lightbox script?

    Thanks in advance.

    Aadm

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is no script on that page. However, a style that broad like:

    Code:
    div {float:left}
    or any other style(s) that target all tags of a certain type are bound to in most cases cause problems in any but the simplest page environments.

    Best to use a class selector to target just the elements you want floated left, for example:

    Code:
    .leftFloat {
     float: left;
    }
    Then give that class to the divisions (and to other elements if appropriate) you want floated left:

    HTML Code:
    <div class="leftFloat">Whatever</div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •