Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

img behavior and strange css problem

Status
Not open for further replies.

wiser3

Programmer
Jun 3, 2003
358
CA
I'm building a site and having a problem with this page:

I need to put about 55 images in here (i know that's a lot but they are small black ad whites pics that noone will ever look at it anyway). I want to images to flow like text. So a narrow window gives a single column of images, widen the screen and they go side by side in two columns, widen further to three columns, etc...

But no matter how narrow i make the images or how wide i make the window they always stay as a single centered column. Why?

Here's the css for the page:

This css rule is where i'm tryins to effect the images:
div.sponsors img { margin: 1em; border: solid 10px green; display: inline }

I set a thick green border to show that the rule isn't working. Why? I've tried various ways of selecting the img but can't get anything applied to them (ie. sponsors img, div.sponsors img, etc...).
 

It is this line:

Code:
#content img   { text-align: center; margin: 1em auto; border: solid 1px #000; display: block }

overriding the display property.

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 

Incidentally, I found this instantly with the excellent Web Devloper toolbar for Firefox... it's definately worth downloading. Then again, you had the source locally, so it probably wouldn't have aided the debugging that much!

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
I found the overriding problem, and came in here to find others found it first.
 

We don't hang around here, you know ;o)

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top