Jump to content


Photo

CSS


  • Please log in to reply
5 replies to this topic

#1 FK47

FK47

    o____0;

  • Members
  • 512 posts
  • Location:Northern Ireland

Posted 16 May 2005 - 11:47 PM

Okay. If you look at my site in IE then FireFox you'll notice the borders around images in the news don't display correctly in FireFox. They kinda squat below the image... but they work in IE like a charm.

I have used the following code in the styles.css for image borders -
}
a.imglink {
        border:1px solid #408020; 

}
a.imglink:hover { 
        border:1px dashed #000000;
And definded it (a class=imglink) when linking the images of course. I have tried using border-top, border-bottom etc etc and placing a table around the image and also using -
display:block;
which spans the entire news coloumn. When I place the image in a table the whole layout messes up.

Any ideas? :p

#2 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 17 May 2005 - 12:37 AM

I usually use three CSS entries. One for a complete top table, my tileable middle section and finally the bottom element. But with MM news script, you have to work aroud it. You cannot command it withh CSS. So just make the CSS elements fit AROUND the news. Only solution I've found...

#3 FK47

FK47

    o____0;

  • Members
  • 512 posts
  • Location:Northern Ireland

Posted 17 May 2005 - 12:40 AM

Impossible then? :(

#4 Hostile

Hostile

    Benefitting Humanity Simply by Showing Up!

  • Veterans
  • 9,551 posts
  • Location:Washington DC
  •  T3A Founder
  • Division:Revora
  • Job:Global Administrator
  • Donated
  • Association

Posted 17 May 2005 - 12:49 AM

Not at all, I just tweak it veiwing in both till I have worked it out.

#5 Kravvitz

Kravvitz

    [X]HTML, CSS, & JS/DOM Adept

  • Members
  • 443 posts
  • Location:USA

Posted 17 May 2005 - 01:32 AM

IE shouldn't do that. IE wrongly increases the height of elements to fully contain their children.

This is one way to fix it. This gives one style to good browsers and another to IE/Win. You could also float the <a> elements, but I don't think you want to do that here.
a img {
  border: 0 none;
}
/* IE5.5+, Firefox, NS6+, Opera 7+ */
a.imglink img {
  border: 1px solid #408020;
}
a.imglink:hover img {
  border: 1px dashed #000000;
}
/* \*/
* html a.imglink img,* html a.imglink:hover img  {
  border: 0 none;
}
* html a.imglink {
  border: 1px solid #408020;
}
* html a.imglink:hover {
  border: 1px dashed #000000;
}
/* */


#6 FK47

FK47

    o____0;

  • Members
  • 512 posts
  • Location:Northern Ireland

Posted 17 May 2005 - 11:08 AM

Kravvitz, you're a genius. :p

Only 1 problem now; the first news image doesn't have a border despite me specifying the class in the news code. Ideas?

EDIT: never mind, I got it. (was using style='border: none" or whatever that is instead of border="0")

Thanks Kravvitz and Hostile for the help.

Edited by FK47, 17 May 2005 - 12:03 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users