Logo

Navigation
  • Home
  • Services
    • ERP Solutions
    • Implementation Solutions
    • Support and Maintenance Solutions
    • Custom Solutions
    • Upgrade Solutions
    • Training and Mentoring
    • Web Solutions
    • Production Support
    • Architecture Designing
    • Independent Validation and Testing Services
    • Infrastructure Management
  • Expertise
    • Microsoft Development Expertise
    • Mobile Development
    • SQL Server Database and BI
    • SAP BI, SAP Hana, SAP BO
    • Oracle and BI
    • Oracle RAC
  • Technical Training
    • Learn Data Management
      • Business Intelligence
      • Data Mining
      • Data Modeling
      • Data Warehousing
      • Disaster Recovery
    • Learn Concepts
      • Application Development
      • Client Server
      • Cloud Computing Tutorials
      • Cluster Computing
      • CRM Tutorial
      • EDI Tutorials
      • ERP Tutorials
      • NLP
      • OOPS
      • Concepts
      • SOA Tutorial
      • Supply Chain
      • Technology Trends
      • UML
      • Virtualization
      • Web 2.0
    • Learn Java
      • JavaScript Tutorial
      • JSP Tutorials
      • J2EE
    • Learn Microsoft
      • MSAS
      • ASP.NET
      • ASP.NET 2.0
      • C Sharp
      • MS Project Training
      • Silverlight
      • SQL Server 2005
      • VB.NET 2005
    • Learn Networking
      • Networking
      • Wireless
    • Learn Oracle
      • Oracle 10g
      • PL/SQL
      • Oracle 11g Tutorials
      • Oracle 9i
      • Oracle Apps
    • Learn Programming
      • Ajax Tutorial
      • C Language
      • C++ Tutorials
      • CSS Tutorial
      • CSS3 Tutorial
      • JavaScript Tutorial
      • jQuery Tutorial
      • MainFrame
      • PHP Tutorial
      • VBScript Tutorial
      • XML Tutorial
    • Learn Software Testing
      • Software Testing Types
      • SQA
      • Testing
  • Career Training
    • Career Improvement
      • Career Articles
      • Certification Articles
      • Conflict Management
      • Core Skills
      • Decision Making
      • Entrepreneurship
      • Goal Setting
      • Life Skills
      • Performance Development
      • Personal Excellence
      • Personality Development
      • Problem Solving
      • Relationship Management
      • Self Confidence
      • Self Supervision
      • Social Networking
      • Strategic Planning
      • Time Management
    • Education Help
      • Career Tracks
      • Essay Writing
      • Internship Tips
      • Online Education
      • Scholarships
      • Student Loans
    • Managerial Skills
      • Business Communication
      • Business Networking
      • Facilitator Skills
      • Managing Change
      • Marketing Management
      • Meeting Management
      • Process Management
      • Project Management
      • Project Management Life Cycle
      • Project Management Process
      • Project Risk Management
      • Relationship Management
      • Task Management
      • Team Building
      • Virtual Team Management
    • Essential Life Skills
      • Anger Management
      • Anxiety Management
      • Attitude Development
      • Coaching and Mentoring
      • Emotional Intelligence
      • Stress Management
      • Positive Thinking
    • Communication Skills
      • Conversation Skills
      • Cross Culture Competence
      • English Vocabulary
      • Listening Skills
      • Public Speaking Skills
      • Questioning Skills
    • Soft Skills
      • Assertive Skills
      • Influence Skills
      • Leadership Skills
      • Memory Skills
      • People Skills
      • Presentation Skills
    • Finding a Job
      • Etiquette Tips
      • Group Discussions
      • HR Interviews
      • Interview Notes
      • Job Search Tips
      • Resume Tips
      • Sample Resumes
 

CSS3 Wrapping

By Exforsys | on March 15, 2007 |
CSS3 Tutorial

CSS3 Wrapping

Wrapping is a vital property for proper display of contents in web pages for if wrapping is disabled then the user could not display and view long lines that goes outside the window boundary and thus becomes useless.

Thus in this context it becomes necessary to handle preformatted text on web pages which can be done in CSS3 in several ways like using text-wrap, by using Pre-tag to display preformatted text on web pages and also by using the concept of word wrap in CSS3.Let’s see about each of these in detail.

Text Wrapping:

The text wrapping in CSS3 is handled by ‘text-wrap’ and ‘word-wrap’ properties. Let us see about these properties in detail.

text-wrap:

The general format of text-wrap property of CSS3 is as follows:

text-wrap: normal | unrestricted | none | suppress

In the above the default initial value is normal and the above format is used for handling text wrapping mode of text in CSS3. In the above we could find that the text-wrap can take any one of the values normal, unrestricted, none or suppress. Let us see what each of this denotes in brief.

Values of text-wrap:

normal:

When this value is taken by text-wrap mode then it denotes that the breaking of lines is allowed at the allowed break points.

unrestricted:

When this value is taken by text-wrap mode then it denotes that the line breaking can take place only between any two grapheme clusters and the final effect of line breaking would be in such as way that the Character shaping would have the effect of no breaking at all.

suppress:

As the name implies when this value is taken by text-wrap mode then the line breaking is suppressed within the element.

none:

When this value is taken by text-wrap mode then lines do not break any text that does not fit within the boundary get overflowed.

Word Wrap:

Like text wrapping as seen above CSS3 also can handle word wrapping by using the property named as word-wrap by which users can define break within a word and thereby prevent the overflowing when a word defined as string becomes long enough to fit inside a line box. But the vital point to note here is the property of word-wrap in CSS3 takes its effect and presence only when the text-wrap property tales its value as ‘normal’ or ‘suppress’.

The general format of word-wrap property of CSS3 is as follows:

word-wrap: normal| break-word

In the above the default initial value is normal and the above format is sued for handling word wrapping mode of text in CSS3. In the above we could find that the word-wrap can take any one of the values normal, suppress. Let us see what each of this denotes in brief.

Values of text-wrap:

normal:

When this value is taken by word-wrap mode then the lines are allowed to break only at the defined and allowed break points.

break-word:

When this value is taken by word-wrap mode then causes an unbreakable word to break provided there are no acceptable break points in the line. Also the breaking of words is done in such a way that the final character shaping would give the effect of word not being broken.

For example:

word-wrap: break-word;

The above statement define in Internet Explorer browser would cause the word-wrapping mode to take the value and effect of value break-word.

In the context of text handling in CSS there is yet another property named as white-space property.This property is similar and in fact a short alternative property for white-space-collapse and text-wrap properties. Let us now see about the white-space property of CSS3 in detail.

white-space Property:

The white-space Property of CSS3 depicts the way of handling and treating the white spaces or line returns in a text. Earlier version of CSS which was CSS2 provided four values for the property white-space. They are:

• inherit
• normal
• pre
• nowrap

CSS3 can take five possible values for the property white-space which are

  • normal
  • pre
  • nowrap
  • pre-wrap
  • pre-line

The general format of text-wrap property of CSS3 is as follows:

white-space: normal | pre | nowrap | pre-wrap | pre-line

In the above the white spaces denotes any of space, tab, and End-of-line characters.

Let us see about each in brief:

normal:

When this value is taken by white-space Property then it sets the value for white-space-collapse property as ‘collapse’ and sets the value for text-wrap property to ‘normal’. Denoting the value of white-space as normal would enable the browser to consolidate sequences of white spaces into a single one and also line wrapping takes place appropriately as needed.

pre:

When this value is taken by white-space Property then it sets the value for white-space-collapse property as ‘preserve’ and sets the value for text-wrap property to ‘none’. Denoting the value of white-space as pre would prevent the browser from consolidating sequence of white spaces into a single one and also the wrapping the lines is prevented.

nowrap:

When this value is taken by white-space Property then it sets the value for white-space-collapse property as ‘collapse’ and sets the value for text-wrap property to ‘none’. When the white-space property takes the value of nowrap then as the name implies no wrapping of lines takes place but white space gets consolidated as needed by the browser.

pre-wrap:

When this value is taken by white-space Property then it sets the value for white-space-collapse property as ‘preserve’ and sets the value for text-wrap property to ‘normal’

pre-line:

When this value is taken by white-space Property then it sets the value for white-space-collapse property as ”preserve-breaks’ and sets the value for text-wrap property to ‘normal’

« « CSS3 Opacity
Ajax Framework » »

Author Description

Avatar

Editorial Team at Exforsys is a team of IT Consulting and Training team led by Chandra Vennapoosa.

Free Training

RSSSubscribe 394 Followers
  • Popular
  • Recent
  • CSS3 Introduction

    February 6, 2007 - 0 Comment
  • CSS3 Selectors

    February 7, 2007 - 0 Comment
  • CSS3 Multi Column Feature

    March 9, 2007 - 0 Comment
  • CSS3 Advantages

    March 12, 2007 - 0 Comment
  • CSS3 Opacity

    March 15, 2007 - 0 Comment
  • CSS3 Links Creation and Usage

    March 19, 2007 - 0 Comment
  • CSS3 Links Creation and Usage

    March 19, 2007 - 0 Comment
  • CSS3 Opacity

    March 15, 2007 - 0 Comment
  • CSS3 Advantages

    March 12, 2007 - 0 Comment
  • CSS3 Multi Column Feature

    March 9, 2007 - 0 Comment
  • CSS3 Selectors

    February 7, 2007 - 0 Comment
  • CSS3 Introduction

    February 6, 2007 - 0 Comment

Exforsys e-Newsletter

ebook
 

Related Articles

  • CSS3 Links Creation and Usage
  • CSS3 Opacity
  • CSS3 Advantages
  • CSS3 Multi Column Feature
  • CSS3 Selectors

Latest Articles

  • Project Management Techniques
  • Product Development Best Practices
  • Importance of Quality Data Management
  • How to Maximize Quality Assurance
  • Utilizing Effective Quality Assurance Strategies
  • Sitemap
  • Privacy Policy
  • DMCA
  • Trademark Information
  • Contact Us
© 2023. All Rights Reserved.IT Training and Consulting
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT