[pmwiki-users] Re: Div Markup + Wiki Styles for Image Placement
Patrick R. Michaud
pmichaud at pobox.com
Sat Jul 9 11:08:21 CDT 2005
On Fri, Jul 08, 2005 at 09:14:01PM -0700, H. Fox wrote:
> Speaking of the style attribute in the <img> tag (style="border: 0px none ;"),
>
> Could the "border: 0px none ;" possibly be moved out of the image
> tag's style attribute and into a selector in the <style> tag in the
> headers?
Not easily. Which isn't to say it's not worth looking into to or
figuring out how to do. Originally it was
<img src='\$LinkUrl' border='0' alt='\$LinkAlt' />
but "border=" is no longer a valid attribute in XHTML, so we have
to use some sort of CSS to get rid of the borders, thus I ended
up with
<img src='\$LinkUrl' style='border:0px;' alt='\$LinkUrl' />
But, as you say, this makes it awfully hard to style images.
Thinking about it now, I'm guessing the solution is to change to
<img src='\$LinkUrl' alt='\$LinkUrl' />
and then put
img { border:0px; }
into the <style> section. This does have the side effect of
changing the default border for all images on the page, but
in my experience borderless images are far more common than
bordered ones, and it'd be pretty easy to find ways to override
it. A site admin can easily customize $ImgTagFmt and the
styles to go back to PmWiki's original settings.
So, unless anyone makes some objections to this, that's what I'll
probably do.
Pm
More information about the pmwiki-users
mailing list