DIV color: white; : div « Tags « HTML / CSS

Home
HTML / CSS
1.CSS
2.CSS Controls
3.Form
4.IE Firefox
5.Layout
6.Marquee Attributes
7.Meta Tags
8.Microsoft Attributes
9.Object
10.Reference
11.Style Basics
12.Tags
13.Templates
14.XML
HTML / CSS » Tags » div 




DIV color: white;
      

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head>
        <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
        <title>Auto width on divs</title>
        <style type='text/css'>
            div {
                width: auto;
                background: black;
                color: white;
            }
        </style>
    </head>
    <body>
        <div>How will this div react to auto width?</div>
    </body>
</html>

   
    
    
    
    
    
  














Related examples in the same category
1.'div' Example
2.div::before content: "I said, \"Hello, world!\"";
3.div::before color: white;
4.div with id selector
5.Using div as img tag
6.This div stretches across the whole window.
7.div content: "This string is placed inside of all div elements.";
8.Using div to layout table elements
9.Div element
10.Div color: #676767;
11.Div based multi-column
12.Div color: red;
13.Div color: #FEF9ED;
14.DIV overflow: hidden;
15.DIV as container
16.Using two Nested DIV to do the layout
17.DIV color: #9D9C6A;
18.DIV color: #505050;
19.Nested div box
20.Default layout for div tags
21.The dialogue div element is aligned vertically and horizontally, no matter what the size of the browser window.
22.div for header and body
23.Grouping Elements Using the div Element
24.Two boxes with div tags
25.HTML divisions
26.Division tag
27.div with id style
28.div with class name
29.div.className (tag.className)
30.div in a div with class name
31.Use DIV as wrapper
32.Click to show or hide DIV section
33.Click to show and hide DIV content (IE only)
34.Block divider
35.'nowrap' is similar to the 'pre' element
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.