麥克斯做個不宅的工程師

Maxi’s idiotic programming.

Scroll bar using CSS

If you have content that is too long or too wide and
you want to add scroll bar to it, here is what to do.

for example:

<div id=”wrapper”>
<div id=”content”>some content</div>
</div>

If your content width/height is larger than its wrapper,

add overflow:auto to “wrapper” CSS style.

May 28, 2008 , Wednesday Posted by maxi326 | Web | , , | No Comments Yet

Useful HTML special character

Character Representation
Non-Breaking Space &nbsp;
&quot;
< &lt;
> &gt;
& &amp;
© &copy;
® &reg;
¢ &cent;
° &deg;
² &sup2;
» &raquo;
« &laquo;
¼ &frac14;
½ &frac12;
¾ &frac34;
± &plusmn;
ü &uuml;
Ø &Oslash;
¡ &iexcl;
ñ &ntilde;

May 28, 2008 , Wednesday Posted by maxi326 | Web | , | No Comments Yet

1pixel border <table> using CSS

If you trying to do this by setting border of <table>, <tr>, <td>,
you won’t get what you want.

Let’s cut the crap, just use this style.
table, td{
border-color: #000000;
border-style: solid;
}
table{
border-width: 0 0 1px 1px;
border-spacing: 0;
border-collapse: collapse;
}
td{
margin: 0;
border-width: 1px 1px 0 0;
}

May 28, 2008 , Wednesday Posted by maxi326 | Web | , , , , | No Comments Yet