Style Sheets
  Home arrow Style Sheets arrow Page 2 - CSS: Text, Fonts, and Tables
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

CSS: Text, Fonts, and Tables
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-03-17

    Table of Contents:
  • CSS: Text, Fonts, and Tables
  • Word Wrapping
  • Adjusting Your Font Size
  • Fonting with Style
  • How to Set the Boldness of a Font
  • Tables in CSS

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    CSS: Text, Fonts, and Tables - Word Wrapping


    (Page 2 of 6 )

    You can remove text wrapping from an element using white-space: nowrap:


    <html>

    <head>

    <style type="text/css">

    p

    {

    white-space: nowrap

    }

    </style>

    </head>

    <body>

    <p>

    Hambone Hambone whats your name? Ask me again and I will tell you the same. You fool! Mr. T pities you greatly! He has decided to auction his multitude of gold chains in order to help raise money to get a girl to date you. I'm not certain it is enough however...

    </p>

    </body>

    </html>

    The Font-ain of Youth

    Manipulating fonts in CSS is one of the great joys of life. If you are a nerd that is. Otherwise it's just a way to spiffy up your text. And who doesn't want to do that? We'll start off with the simple:

    Setting the Font of Your Text with CSS


    <html>

    <head>

    <style type="text/css">

    h1 {font-family: impact}

    h2 {font-family: verdana}

    h3 {font-family: times}

    p {font-family: courier}

    p.sansserif {font-family: sans-serif}

    </style>

    </head>

    <body>

    <h1>Behold the Impact of a corny pun!</h1>

    <h2>This is Verdana text</h2>

    <h3>And I am his buddy Times!</h3>

    <p>Just your friendly Courier here</p>

    <p class="sansserif">And I'm loveable sans-serif</p>

    </body>

    </html>

    Setting the Font of A Paragraph

    You can use caption to set the font of a paragraph, as in the following example:


    <html>

    <body>

    <p>Behold my paragraph with a normal font</p>

    <p style="font: caption">Now behold this one which uses a caption font!</p>

    </body>

    </html>

    More Style Sheets Articles
    More By James Payne


       · Welcome to my article in an ongoing series on CSS. Here, in this episode, we discuss...
       · "table-layout:" should be "auto". A CSS2 validation error occurs with table-layout:...
       · Hey, thanks for catching that. I'll be sure to change it in the...
     

    STYLE SHEETS ARTICLES

    - Image Replacement CSS Techniques
    - Using BlueTrip`s Success, Notice and Error C...
    - More Uses for the Thin and Caps CSS Classes ...
    - Styling Definition Lists with the BlueTrip C...
    - Styling Unordered and Ordered HTML Lists wit...
    - Using the BlueTrip CSS Framework`s Thin and ...
    - Adding Borders to Web Page Columns with Blue...
    - Introducing the BlueTrip CSS Framework
    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek