2012-02-14 98 views
3

我剛剛進行了大約20次實習技術面試,我的大多數面試官都打印了我的簡歷。我注意到了它在打印格式中的一些嚴重不一致,我假設罪魁禍首是不同瀏覽器「呈現」html/css的差異。如何使頁面看起來不錯打印/跨多個瀏覽器

兩個主要問題是(常見的,並不是太大的一筆交易)子彈點大小和我的簡歷(罕見,但很大)的寬度不適合一個頁面,所以TON的東西被扔進下一行。

我的整個簡歷寬度是800px,有很多項目符號,幾個邊框和一堆div(其中有些是左邊的,所以我可以有兩列)。有沒有一種資源可以記錄您需要注意的事項,以便製作需要在多個瀏覽器中保持一致的頁面?當某人的印刷邊距是3英寸時,是否有辦法縮小頁面,而不是破壞設計的替代方法?

謝謝! (這裏是冗長的html/css源代碼(我不希望你在這裏通過它,但更有可能複製粘貼到記事本中,併爲自己打開頁面)。

編輯:或見jsfiddle page

<html> 
<head> 
    <title>Andrew Rasmussen</title> 
    <style type="text/css" media="all"> 
     * {margin:0;padding:0;color:#000;font-size:1em} 
     body {font:11px Verdana;line-height:13px} 
     h2 {margin:0.8em 0 0.2em;text-transform:uppercase;font:bold 1.4em verdana;border-bottom:dotted 1px #777} 
     h4 {display:inline;padding-right:4px} 
     p, ul {margin-bottom:1.4em} 
     ul {margin-left:1.2em;padding-left:1.2em;margin-bottom:0} 
     li {margin-bottom: .2em} 
     #experience h3 {font-weight:normal} 
     #title {text-align:center} 
     #title p {margin:0} 
     #title h1 {font:normal 1.8em verdana} 
     #skills {clear:both} 
     #skills p {display:inline;margin:none} 
     #other h3, #other p {display:inline} 
     #wrapper {width:800px} 
     .entry {float:left;height:140px;border-bottom:1px dotted black} 
     .odd {border-right:1px dotted black;width:394px;padding-right:5px} 
     .even {width:390px;padding-left:10px} 
     .five {height:125px;border-bottom:none} 
     .six {height:125px;border-bottom:none} 
     .for {font:bold 1em verdana;position:relative} 
     .for span {font-style:oblique;font:normal 1em verdana;position:absolute;right:0;top:0} 
    </style> 
    <style type="text/css" media="screen"> 
     body {padding:2em} 
    </style> 
</head> 
<body> 
<div id="wrapper"> 
<div id="masthead"> 
    <div id="title"><h1>Andrew Rasmussen</h1><p>3A Software Engineering - University of Waterloo</p><p>arasmussen [at] katworks.com</p></div> 
</div> 
<div id="skills" class="section"> 
    <h2>Technical Skills</h2> 
     <ul> 
     <li>Eight years of programming experience 
     <ul> 
      <li><h4>C/C++ (8 years)</h4>- 3D games (OpenGL), industry experience with pointers, STL, OOP, templates</li> 
      <li><h4>PHP, MySQL (2 years)</h4>- Backend of web applications with thousands of rows in the database</li> 
      <li><h4>OpenGL/GLSL (1 year)</h4>- Modern OpenGL using vertex buffer objects, fragment/vertex shaders</li> 
      <li><h4>C# (8 months)</h4>- Windows Forms GUI applications, backend of ASP.NET web applications</li> 
      <li><h4>JavaScript, jQuery (6 months)</h4>- Interactive web plugins</li> 
      <li><h4>Python (6 months)</h4>- 2D games using PyGame (Astroids and Breakout clones)</li> 
     </ul></li> 
     <li>Familiarity: XML, JSON, Regex, HTML, CSS, Scheme, ASP.NET, Perl, Lua, Bash</li> 
     <li>Platforms: Linux (Ubuntu, Red Hat, Fedora), Windows</li> 
     <li>Editors: Vim, Visual Studio 2008/2010, Eclipse</li> 
    </ul></div> 
<div id="experience" class="section"><h2>Relevant Work Experience</h2> 
    <div class="entry odd"> 
     <div class="for">Digital Extremes: London, ON<span>September-December, 2011</span></div> 
     <h3>Star Trek Gameplay Programming</h3> 
     <div class="details"> 
      <ul> 
       <li>Independently designed, implemented, and tested many new features and bug fixes</li> 
       <li>Touched a broad spectrum of codebase from low-level network serialization in the engine to high-level visible gameplay features</li> 
       <li>Technologies: C++, Lua</li> 
      </ul> 
     </div> 
    </div> 
    <div class="entry even"> 
     <div class="for">Morgan Stanley: New York, NY<span>January-April, 2011</span></div> 
     <h3>Electronic Trading Infrastructure</h3> 
     <div class="details"> 
      <ul> 
       <li>Enhanced and fixed a C++ project which serializes C++ objects into specific formats</li> 
       <li>Project was distributed for use in internal trading applications in production</li> 
       <li>Solely responsible for the design and testing of my enhancements and bug fixes</li> 
       <li>Technologies: C++, Bash, Perl, Python, JSON</li> 
      </ul> 
     </div> 
    </div> 
    <div class="entry odd"> 
     <div class="for">Qualcomm Incorporated: San Diego, CA<span>May-August, 2010</span></div> 
     <h3>QDSP6 Audio Test Framework</h3> 
     <div class="details"> 
      <ul> 
       <li>Designed and developed a Perl script to automate audio testing with extensive capabilities, including running overnight stress tests, recording audio playback, and comparing audio output using bit exactness</li> 
       <li>Ran stability and stress tests for bi-weekly builds</li> 
       <li>Assisted our development team in developing these C++ tests</li> 
       <li>Technologies: Perl, C++, Bash</li> 
      </ul> 
     </div> 
    </div> 
    <div class="entry even"> 
     <div class="for">Microsoft Corporation: Redmond, WA<span>June-August, 2009</span></div> 
     <h3>Visual Studio 2010 Globalization</h3> 
     <div class="details"> 
      <ul> 
       <li>Developed and tested a web-based Silverlight application that could be localized for multiple locales as a presentation piece to help explain the process of Globalization</li> 
       <li>Pseudo-localized a daily build of Visual Studio 2010 for familiarity with the globalization process</li> 
       <li>Technologies: ASP.NET, Silverlight, C#, HTML, CSS</li> 
      </ul> 
     </div> 
    </div> 
    <div class="entry odd five"> 
     <div class="for">Microsoft Corporation: Redmond, WA<span>June-August, 2008</span></div> 
     <h3>Windows Embedded, Point of Service</h3> 
     <div class="details"> 
      <ul> 
       <li>Developed an application that kept an inventory of POS devices and associated information</li> 
       <li>Designed a neat, systematic, GUI that could be accessed throughout the entire team (over network)</li> 
       <li>Technologies: C#, Windows Forms, SQL, ADO.NET</li> 
      </ul> 
     </div> 
    </div> 
    <div class="entry even six"> 
     <div class="for">Freelance Work</div> 
     <div class="details"> 
      <ul> 
       <li>Real Estate Listing - currently developing an interactive real estate site (PHP, jQuery, MySQL) - for Tungsten Property</li> 
       <li>Content Slider - a jQuery plugin that slides between any generic unordered list of div's you give it - for Katworks Inc.</li> 
       <li>Xliff Target Editor - a C# WinForms application to edit XML-like files with a GUI - for Katworks Inc.</li> 
       <li>Directory Remover - an easily configurable DOS Batch script to schedule the removal of certain directories - for Global Labs</li> 
      </ul> 
     </div> 
    </div> 
</div> 
<div id="other">  
    <div id="activities" class="section"><h2>Related Activities</h2> 
     <ul> 
      <li><h3>Game/Graphics Programming:</h3> 
       <ul> 
        <li>3D games (C++, modern OpenGL) using vertex buffer objects and shaders (GLSL)</li> 
        <li>Rendered ~3 million textured triangles using VBOs with >300fps in a minecraft-like game (including physics)</li> 
        <li>Designed and implemented a game using a heightmap and associated collision detection</li> 
       </ul> 
      </li> 
      <li><h3>Web Programming:</h3> 
       <ul> 
        <li>Interactive web plugins using vanilla JavaScript or jQuery</li> 
        <li>Applications with a PHP/MySQL backend and careful, secure, graphical interface to the database</li> 
       </ul> 
      </li> 
      <li><h3>Stack Overflow: </h3>Over 130 answers, have a reputation in the top 12% of users; mostly from answering C++/OpenGL questions</li> 
      <li><h3>Project Euler: </h3>Completion of the dozens of challenges on this programming challenge/contest site for fun</li> 
      <li><h3>UW/Google AI Challenge: </h3>Participation in two Google sponsored, UW hosted, AI programming competitions. Overall ranking in both challenges were in the top quartile. Competition subjects include Rock Paper Scissors and Tron.</li> 
     </ul> 
    </div> 
    <div id="education" class="section"><h2>Education</h2> 
     <ul> 
      <li><h3>Candidate for Bachelor of Software Engineering </h3>at the University of Waterloo, June 2014. Relevant courses include Operating Systems, Algorithms, Object Oriented Software Development, Data Structures</li></ul></div> 
</div> 
</div> 
</body> 
</html> 

回答

2

還有的CSS3 Module: Paged Media,在那裏你可以自己定義的margin等性能。但是,我建議您將您的簡歷轉換爲PDF格式並將其放到您的網站上以供離線使用,因爲(1)您無法確定收件人的瀏覽器是否會理解您的樣式表,以及(2)字體'Verdana'安裝在收件人的PC上。

如果你想實現對所有瀏覽器面試官相同的行爲可以使用,那麼你就必須通過兼容性測試,打打工,安裝多個瀏覽器,打印在不同的操作系統......連那麼你不能確定你的收件人沒有使用一個行爲奇怪的瀏覽器。 HTML和CSS畢竟只有標記/樣式語言和標準只有建議。 PDF被確定爲在所有兼容設備上都是相同的,並且是ISO標準。我寧願堅持使用PDF,而不是使用HTML/CSS來提供這種設計。

(額外的信息 - 上體面的瀏覽器,就可以實現.odd.even.entry:nth-of-type(odd).entry:nth-of-type(even)

+0

+1表示PDF;如果您關心佈局,HTML根本不適合於今天的打印。 – 2012-02-14 09:05:33

+0

對不起,我應該在我的文章中提供這些信息,但我通過我的學校將我的簡歷提交給僱主,他們只接受html格式,他們的解析器不會接受DOCTYPE(更多的是Lister先生)。否則,謝謝! – 2012-02-14 16:13:33

2

子彈點大小異常是由怪癖模式造成的。將DOCTYPE聲明放在頂部以觸發標準模式,並且子彈將會正常。

除了margin:none,我真的沒有看到您的來源中有任何錯誤。
那麼,建議將字體名稱視爲區分大小寫,因此這將是'Verdana',這是系統擁有它的方式。

我不認爲真的有一個完整的清單,這種建議的地方。也許我應該自己提一些東西。

無論如何,請參閱其他答案。

+0

嘿,請看我在Zeta的帖子上留下的評論。感謝這篇文章。 – 2012-02-14 16:13:51

相關問題