Display block or inline : inline block « CSS Style « XML






Display block or inline



File: Data.xml

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<paragraph>
    A
    <reference>B</reference> 
    C<keyword>D</keyword>
</paragraph>

File: Style.css

paragraph {
   display:block;
   padding:10px;
   border:solid; 
   border-width:4px; 
   border-color:#CCCCCC;
}

reference {
   display:inline;
   font-style:italic;
   color:#CC3333;
   border:solid; 
   border-width:2px; 
   border-color:#CCCCCC;
}

keyword {
   display:inline;
   font-weight:bold;
   color:#990000;
   border:solid; 
   border-width:2px; 
   border-color:#CCCCCC;
}

 








Related examples in the same category