SVG Scaling Text to fit container

If you really don’t care that the text gets ugly, here’s how to fit unknown length text into a known width. <svg width=”436″ height=”180″ style=”border:solid 6px” xmlns=”http://www.w3.org/2000/svg”> <g> <text y=”50%” textLength=”436″ lengthAdjust=”spacingAndGlyphs”>UGLY TEXT</text> </g> </svg>

Table with table-layout: fixed; and how to make one column wider

You could just give the first cell (therefore column) a width and have the rest default to auto table { table-layout: fixed; border-collapse: collapse; width: 100%; } td { border: 1px solid #000; width: 150px; } td+td { width: auto; } <table> <tr> <td>150px</td> <td>equal</td> <td>equal</td> </tr> </table> or alternatively the “proper way” to get … Read more

Is div inside list allowed? [duplicate]

Yes it is valid according to xhtml1-strict.dtd. The following XHTML passes the validation: <?xml version=”1.0″?> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Test</title> </head> <body> <ul> <li><div>test</div></li> </ul> </body> </html>

Specifying Tab-Width?

Use the tab-size property. You’ll need vendor prefixes currently. Example: pre { -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; } See also the article on developer.mozilla.org: tab-size. .tabstop { -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; } Unstyled tabs (browser default) <pre> one tab two tabs three tabs </pre> Styled tabs (4em) <pre class=”tabstop”> one tab two … Read more

Safari anchors on links not working

The problem was I had a redirect header in the page I was linking to. Opera, IE, Chrome, Firefox will carry over the anchor to the new page. However safari loses the anchor on the redirect. If you are having trouble with safari anchors disable any redirects.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)