PDA

View Full Version : Lightbox "Floats Left" - div conflict?



adamf
10-05-2009, 04:24 PM
1) Script Title:
Lightbox 2.0a

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/lightbox2/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; cursor:pointer}
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 :confused:

jscheuer1
10-06-2009, 03:13 AM
There is no script on that page. However, a style that broad like:


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:


.leftFloat {
float: left;
}

Then give that class to the divisions (and to other elements if appropriate) you want floated left:


<div class="leftFloat">Whatever</div>