Advanced search  


cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.

Pages: [1]   Go Down

Author Topic: px text in <td> width attribute invalid  (Read 8456 times)

0 Members and 1 Guest are viewing this topic.


  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
px text in <td> width attribute invalid
« on: August 02, 2005, 03:26:30 am »

It is invalid to use px in the width value for <td> tags:


Code: [Select]
<td width="48px">

Code: [Select]
<td width="48">

Also, for <table> tags:


Code: [Select]
<table cellspacing="48px" cellpadding="48px">

Code: [Select]
<table cellspacing="48" cellpadding="48">
In, if you do a search, you'll find plenty of these that need changed.

« Last Edit: August 02, 2005, 07:21:20 am by donnoman »


  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From
    • Donovan Bray
Re: px text in <td> width attribute invalid
« Reply #1 on: August 02, 2005, 07:20:59 am »

I think we discussed this at least once on the dev list, bottom line there was confusion between css, and based on the fact that the px's didn't trip the XHTML validator I left it alone.

I believe as you do that when used in the context of xhtml attributes there should be no size qualifier, only used when used with CSS presentational elements such as style="" or inside the stylesheet itself.

Looking at the XHTML 1.0 Transitional DTD confirms this

Code: [Select]
<!ENTITY % Length "CDATA">
    <!-- nn for pixels or nn% for percentage length -->

<!ELEMENT table
     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
<!ELEMENT caption  %Inline;>
<!ELEMENT thead    (tr)+>
<!ELEMENT tfoot    (tr)+>
<!ELEMENT tbody    (tr)+>
<!ELEMENT colgroup (col)*>
<!ELEMENT col      EMPTY>
<!ELEMENT tr       (th|td)+>
<!ELEMENT th       %Flow;>
<!ELEMENT td       %Flow;>

<!ATTLIST table
  summary     %Text;         #IMPLIED
  width       %Length;       #IMPLIED
  border      %Pixels;       #IMPLIED
  frame       %TFrame;       #IMPLIED
  rules       %TRules;       #IMPLIED
  cellspacing %Length;       #IMPLIED
  cellpadding %Length;       #IMPLIED
  align       %TAlign;       #IMPLIED
  bgcolor     %Color;        #IMPLIED

I only had to update and minibrowser.php. Committed.

Pages: [1]   Go Up

Page created in 0.016 seconds with 18 queries.