Monthly Archives: February 2006

A Print CSS Primer

There has always been a gaping divide between the web and print on paper. Browsers have never been able to quite get pages to print out correctly. Wide pages run off the side of the page, header elements appear comically large, words wrap incorrectly. Print stylesheets are an elegant, simple solution. They require no extra "Print this page" link, don’t affect page download times, require no scripting, will work on password-protected files, and eliminate the need for duplicate print-only pages.
 
This here page is a very simple example of print stylesheets in action. This page is created using a simple, two-column tabular layout†, with a few key page elements: a title, this column (content), the column to the right (navigation), and a footer, all of which are important elements for the screen. But when you print this page out, you certainly don’t need the navigation (you’re not going to click on a piece of paper, duh), and here you don’t need the footer.
 
To get all the pages on your site to have nice printed versions, you need to create one extra css file (I cleverly called mine print.css) and add one line of code to your html document’s header:
 
<link rel="stylesheet" media="print" href="print.css" type="text/css" />
 
When a user selects the "Print" function from their web browser, your print.css file is substituted for the default stylesheet. The print.css file will be similar to your global stylesheet, but should contain the changes you wish to see on a printout. In this example, we want to remove the navigation and footer, so we add this line of code:
 
#navigation, #footer, .noprint { display: none; }
 
This line tells any html element with id="navigation" or id="footer" or class="noprint" to not show up for the printout (FYI, you get one id per document, but as many class elements as you want [reference]). This means that you could apply the class="noprint" to any part of the page you don’t want to see in print. For example, the following paragraph will not show up on the printout.
 
Booger.
 
In the html for this page, the elements to be removed (corresponding with the above css) look like this:
 
<td id="navigation"> and <p class="noprint">
 
Okay. For the sake of better typography, we’re also going to change the font of the main content for printout. Onscreen, I chose a sans-serif font (Verdana, Arial, Helvetica, sans-serif), but a font with serifs (Times New Roman, Garamond, serif) will look much better on paper. I also bumped the font size up to 12pt, set the text to be black on white, bumped the width of the content pane out to 100%, and removed the border, all with this simple CSS:
 
body, p, td, th, ul, a {
background-color: #fff;
color: #000;
font-family: "Times New Roman", Garamond, serif;
font-size: 12pt;
}
 
#content {
background-color: #fff;
width: 100%;
border: none;
}
 
That’s all there is to it! If your browser has a "Print Preview" function, check out its results. You can also look at a version of this same page which has the screen style set to print.css.

Visual Basic十年风云

 
我从来没有想到过,撰写这篇文章需要十年的光阴
 
有时我自清晨的睡梦中醒来,望着窗外高楼间透露的微稀曙光
 
耳畔都不免响起那些岁月烙印后的沧桑
 
那些原本可以避免或是终就注定的结局
 
我不是一个诗人,也不是一名作家
 
只是一位信息历程的过客, 静静沉醉在这不一样的感动
 
历史象河流,也象镜子,它让我们看到过去,也见证现在的自己……

Continue reading

修改vol的xp为oem的xp

现在大家用的xp 无非就是2种,vol或者oem的。个人倾向于使用oem的。因为vol的key经常会被封,导致无法升级,而oem的就没有这个问题了。但oem的需要修改bios。这就是各取所爱吧。
 
oem的光盘网上流传的最多的,就是联想的。但使用联想原版的有几个问题
1、安装过程中不能对硬盘进行重新分区
2、安装过程是全自动的,不能进行自己的设置。比如设置administrator的密码等。
3、安装完成后是联想的主题,n难看。。
 
所以我都是把零售版的vol光盘,修改一下变成oem的,然后使用。
用beyond compare对比vol和oem的i386文件夹,其实只有5个文件不同。分别是:
OEMBIOS.BI_
OEMBIOS.CA_
OEMBIOS.DA_
OEMBIOS.SI_
SETUPP.INI
 
所以,我们只需要把这5个文件替换一下,就可以实现了。具体来说就是用UltraISO打开vol的iso,然后把这5个文件替换进i386文件夹,修改卷标,保存就可以了。
5个文件我也提供下下载
 
 

思科宣布一亿美元收购盛大9.7%股份

今天中午要吃饭的时候,习惯上再看一次greatnews,结果就看到这样条新闻:
 
北京时间2月15日消息,根据思科提交给美国证券交易委员会(SEC)的文件,思科系统收购了盛大网络9.7%的股份.
   思科系统披露,已经购买了1386万股盛大网络普通股,但是没有披露收购价格.按照周二的收盘价,这具有1.04亿美元的市值.摩根大通分析师迪克-魏表示,这些股票是去年收购的,其中包括从日本软银购买的693万股.摩根大通继续保持对盛大网络的评级,由于采用了免费玩游戏的新模式,这将使盛大网络核心业务的收入下降,而新的媒体业务前途未卜.