free tag frontend HTML does not validate?

Found a bug? Tell us!!
Post Reply
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

free tag frontend HTML does not validate?

Post by zoran »

When I try to validate my page at the w3c validator, I get errors on all serendipity_freetag divs. I'm not into css, can somebody point out what's wrong with the nesting?

This is the nesting:

Code: Select all

<div class="entrytext"><p class="postmetadata"><small><div class="serendipity_freeTag"></div></small></p></div>
This is the validator result:
http://validator.w3.org/check?uri=http% ... =1#line-68

Best, Zoran
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

ur using an old version of it
i beleive this problem has already been fixed.
Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: free tag frontend HTML does not validate?

Post by garvinhicking »

Actually this is not a problem of the plugin, but of the Kubrick template. It uses a "<small>" Tag which is a non-block element. But block elements often occur within Sidebars.

So the best thing is to replace the <small> tag within sidebar.tpl (?) with a <div class="small"> or so, and style it with CSS...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post by zoran »

Hi Garv,

I changed the <p> tag into a <div> tag and did some stylesheet changes, and it works now. Should I commit this in CVS?

Now I try to validate the CSS:
http://jigsaw.w3.org/css-validator/vali ... c.nl/blog/

This give the error

Code: Select all

Line: 2 Context : img

Property behavior doesn't exist : url("http://www.kovacevic.nl/blog/plugin/pngbehavior.htc")
Any idea what that does?

Regards, Zoran
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Which patch did you do exactly?

About the .htc thing: This is required for browser compatibility so that IE can display transparent PNG images. It cannot be done in a W3C validating way.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post by zoran »

I basically replaced the small with a div tag. Where a p tag was present, I replaced that with a div and removed the small. Added the small style definition from the css to the containing element. More or less ;)

I changed these files:

Code: Select all

$ diff fresh/comments.tpl kubrick/comments.tpl
9c9
<         <small class="commentmetadata">
---
>         <div class="commentmetadata">
18c18
<         </small>
---
>         </div>

Code: Select all

$ diff fresh/entries.tpl kubrick/entries.tpl
8c8
<             {if !$is_single_entry}<small>{$entry.timestamp|@formatTime:DATE_FO
RMAT_ENTRY}</small>{/if}
---
>             {if !$is_single_entry}<div class="small">{$entry.timestamp|@format
Time:DATE_FORMAT_ENTRY}</div>{/if}
32,33c32
<             <p class="postmetadata{if $is_single_entry} graybox{/if}">
<                 <small>
---
>             <div class="postmetadata{if $is_single_entry} graybox{/if}">
82,83c81
<                 </small>
<             </p>
---
>                </div>

Code: Select all

$ diff fresh/trackbacks.tpl kubrick/trackbacks.tpl
5c5
<         <small class="commentmetadata">
---
>         <div class="commentmetadata">
11c11
<         </small>
---
>         </div>
and style.css, but unfortunately diff considers the whole file different (any ideas which switches to use to prevent this?), so please check this deeplink: http://www.kovacevic.nl/blog/templates/ ... /style.css

Zoran

P.S.: Too bad about the MSIE hack
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Zoran,

the patch is fine with me, do you have a SVN (not CVS!) account so you can commit it to trunk? If not, I can give you one if you get yourself a www.berlios.de account :)

The full file difference in style.css can come because the file currently may have windows linebreaks instead of unix linefeeds?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post by zoran »

patch commited in SVN :)
Post Reply