Topic: Image margin

Hi,

I extended the base.css file by the few following lines:

.news_image {
  display : block;
  float : left;
  margin : 10px;
  border : 1px solid #000000;
}

Then I used it within a <div class="inbox">foobar</div> block on <img class="news_image" src="'.PUN_ROOT.'/img/smilies/cool.png" alt="" />.

The problem is, that neither the margin nor the border is shown by the browser. Any ideas about what could be wrong?

Re: Image margin

Has no one an idea? I would be very grateful for at least one.

3

Re: Image margin

I discovered the same thing...

couldn't put a margin or a border around images which appear in the sidebar...

never figured it out.

Re: Image margin

I used your code but added .pun like the example shows and worked fine.

.pun .news_image {
  display : block;
  float : left;
  margin : 10px;
  border : 1px solid #000000;
}

5

Re: Image margin

Correct. The answer was specificity. If anyone doesn't know what it is, look it up; its the single biggest reason people have trouble with style sheets.

Re: Image margin

Thats it, thanks a lot.