Using image to add shading to your text : img « Tags « HTML / CSS






Using image to add shading to your text

      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "text/html; charset=us-ascii" />
    <meta name="Robots" content="index,follow" />
    <meta name="author" content="Aaron Ganschow, aaron@unkommon.com" />
    <title>
      Antique_Modern
    </title>

<style type="text/css">
body
{
  background: #e4e4e4 url(Antique-Modern-images//background.gif) repeat-x top left;
  margin: 0px; 
  padding: 0px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 12px;
}

#head
{
  background: #e4e4e4 url(Antique-Modern-images//head_empty.gif) no-repeat top left;
  width: 747px;
  height: 117px;
  padding: 0px;
  margin: 0 auto;
}

#head #title
{
  float: left;
   font-size: 30px;
  color: #F0EBE7;
  padding: 35px 0px 0px 30px;

}

#body_wrapper
{
  background: url(Antique-Modern-images//body_cont.jpg) repeat-y top left;
  margin: 0px auto;
  width: 747px;
  display: block;
}


#body
{
  background: url(Antique-Modern-images//body_top.jpg) no-repeat top left;
  float: left;
  padding: 10px 20px 0px 20px;
  min-height: 343px;
  display: block;
}

#end_body
{
  background: url(Antique-Modern-images//footer.jpg) no-repeat top left;
  margin: 0px auto;
  width: 747px;
  height: 37px;
  display: block;
}

.clearer
{
  clear: both;
  height: 1px;
}

#all
{
  width: 707px;
  float: left;
  padding: 0px;
  background: url(Antique-Modern-images//all_middle.gif) repeat-y top left;
}

#all .top
{
  background: url(Antique-Modern-images//all_top.gif) no-repeat top left;
  width: 707px;
  height: 18px;
  padding: 0px;
  margin: 0px;
}

#all .bottom
{
  background: url(Antique-Modern-images//all_bottom.gif) no-repeat bottom left;
  width: 707px;
  height: 21px;
  padding: 0px;
  margin: 0px;
}

#left
{
  width: 538px;
  float: left;
  padding: 0px;
  margin: 0px;
  background: url(Antique-Modern-images//left_middle.gif) repeat-y top left;
}

#left .top
{
  background: url(Antique-Modern-images//left_top.gif) no-repeat top left;
  width: 538px;
  height: 18px;
  padding: 0px;
  margin: 0px;
}

#left .bottom
{
  background: url(Antique-Modern-images//left_bottom.gif) no-repeat bottom left;
  width: 538px;
  height: 21px;
  padding: 0px;
  margin: 0px;
}

#right
{
  width: 169px;
  float: right;
  padding: 0px;
  margin: 0px;
  background: url(Antique-Modern-images//right_middle.gif) repeat-y top left;
}

#right .top
{
  background: url(Antique-Modern-images//right_top.gif) no-repeat top left;
  padding: 0px;
  margin: 0px;
  width: 169px;
  height: 18px;
}

#right .bottom
{
  background: url(Antique-Modern-images//right_bottom.gif) no-repeat bottom left;
  padding: 0px;
  margin: 0px;
  width: 169px;
  height: 21px;
}

.content 
{
  padding: 0px 15px;
}

#footer
{
  margin: 0 auto; 
  width: 747px;
  text-align: center;
  color: #B05128;
  font-weight: bold;
}

#footer a
{
 color: #B05128;
}

#right ul 
{
  margin: 0px;
  padding: 0px;
  list-style: none;
}

#right ul li 
{
  margin: 0px;
  padding: 0px;
  list-style: none;
  display: block;
}

#right ul a 
{
  display: block;
  width: 125px;
  background: #c7b8a4;
  color: #000;
  padding: 3px;
  padding-left: 10px;
  text-decoration: none;
  margin: 0px;
  border: 0px;
}

#right ul a:hover 
{
  color: #FFFFFF;
  background: #822C0F;
}

/* Navigation */

#menu 
{
  float: right;
  margin: 80px 20px 0px 0px;
}

#menu ul 
{
  margin: 0;
  padding: 0;
  white-space : nowrap;
}

#menu ul li 
{
  margin: 0;
  padding: 0;
  display: block;
  float:left;
  text-align: center;
}

#menu ul li a 
{
  color : #fff;
  background-color: transparent;
  text-decoration : none;
  font-weight: bold;
  display: block;
  border-style:none;
}

#menu ul li a:link, #menu ul li a:visited 
{
  background-image: url(Antique-Modern-images//menu_item2.gif);
  background-repeat: no-repeat;
  height: 26px;
  width: 94px;
  line-height: 26px;
  padding-top: 7px;
}

#menu ul li a:hover, #menu ul li a:active 
{
  background-image: url(Antique-Modern-images//menu_item2.gif);
  background-repeat: no-repeat;
  background-position: 0px -33px;
  height: 29px;
  width: 94px;
  line-height: 29px;
  padding-top: 4px;
}

#menu ul li.active a:hover, #menu ul li.active a:active, #menu ul li.active a:link, #menu ul li.active a:visited 
{
  background-image: url(Antique-Modern-images//menu_item2.gif);
  background-repeat: no-repeat;
  background-position: 0px -66px;
  height: 29px;
  width: 94px;
  line-height: 29px;
  padding-top: 4px;
  color: #B05128;
}


/*  Headers  */
h1 
{
  padding: 0px;
  margin: 0px;
  margin-bottom: 5px;
  color: #D96B11;
  background-color: transparent;
  font-size: 1.6em;
  font-weight: bold;
}

h2 
{
  padding: 0px;
  margin: 0px;
  margin-bottom: 5px;
  color: #333;
  background-color: transparent;
  font-size: 1.5em;
  font-weight: bold;
}

h3 
{
  padding: 0px;
  margin: 0px;
  margin-bottom: 5px;
  color: #76b7d7;
  background-color: transparent;
  font-size: 1.4em;
  font-weight: bold;
}

h4 
{
  padding: 0px;
  margin: 0px;
  margin-bottom: 5px;
  color: #333;
  background-color: transparent;
  font-size: 1.3em;
  font-weight: bold;
}

h5 
{
  color: #9ad5f3;
  background-color: transparent;
  padding: 0px;
  font-size: 1.2em;
  font-weight: bold;
  margin: 0px;
  padding: 0px;
  margin-bottom: 5px;
}

h6 
{
  padding: 0px;
  margin-top: 0px;
  margin-right: 0px;
  margin-bottom: 5px;
  margin-left: 0px;
  color: #D96B11;
  font-size: 1.1em;
  font-weight: normal;
  line-height: 150%;
}

/* HTML Tags */

code
{
  display: block;
  margin: 5px;
  padding: 5px;
  color: #ad4c21;
  border: 1px dashed;
  background: #f0ebe7;
  font-family: Courier, 'Courier New', 'Andale Mono', Monaco, monospace;

}

a
{
  color: #AD4C21;
  text-decoration: none;
  border-bottom: 1px dashed;
  padding-bottom: 0px;
}

a:hover
{
  color: #000;
}

hr
{
  border: 0px;
  border-bottom: 1px #F0EBE7 dashed;
  height: 1px;
}

#left hr, #all hr
{
  margin: 10px 0px;
}

form
{
  margin: 0px;
  padding: 0px;
}

form .item
{
  clear: left;
  border-top: 1px solid #EEE;
  margin: 3px;
}

form .label
{
  float: left;
  clear: left;
  width: 150px;
}

input, textarea, select
{
  color: #AD4C21;
  border: 1px solid;
  background: #F0EBE7;
  margin: 3px;
  padding: 2px;
}

blockquote {
  margin: 5px;
  background: transparent url(Antique-Modern-images//quotes.gif) left top no-repeat;
  padding-left: 37px;
}

blockquote[cite]:after {
  content: "Quote from: " attr(cite);
  display: block;
  border-top: 1px solid #999;
  color: #999;
  margin: 1em 0 0;
  padding: .5em 0 0;
  font-size: .8em;
  font-weight: bold;
}

del 
{
  color: #800;
  text-decoration: line-through;
}

dt
{
  font-weight: bold;
  font-size: 1.05em;
  color: #ad4c21;
}

dd 
{
  margin-left: 15px;
}

/* adds a space and then a graphic after any external (i.e. off-site) links */
a[target]:after{
  content: " " url(Antique-Modern-images//externalpage.gif);
}
</style>
  </head>
  <body>
    <div id="head">
      <div id="title">
           Antique Modern
      </div>
      <div id="menu">
        <ul>
          <li class="active">
            <a href="#" title="Resume">Index</a>
          </li>
          <li>
            <a href="1col.html" title="One Column">1 Column</a>
          </li>
          <li>
            <a href="tags.html" title="Tags">Tags</a>
          </li>
          <li>
            <a href="#" title="Blank">Blank</a>
          </li>
        </ul>
      </div>
    </div>
    <div id="body_wrapper">
      <div id="body">
        <div id="left">
          <div class="top"></div>
          <div class="content">
            <h1>News</h1>
            <h2>March 10, 2006</h2>
            <p>
              I have fixed a few lingering problems in the CSS of the design.  The 
              css now validates due to the removal of an unnecessary expression() in 
              the height of #body, as well as fixing an issue that would make 
              the tabs on top change their location depending on user fonts.  So
              hopefully this will be the last bugfix/update!
            </p>
            <h2>March 9, 2006</h2>
            <p>
              I extended the modified tags on the <a href="tags.html">tags</a>
              page.  Enjoy the vast amount of customization for this template!
            </p>
            <h2>March 8, 2006</h2>
            <p>
               The new design seems to be up and running.  I have been pondering
               what to name this template while putting it up as an Open Source
               design.  Well, I couldn't think of anything creative, so I went
               with Antique_Modern.  There is a 2 column layout (which you see
               here) and a <a href="1col.html">1 column layout</a> for alternate pages.  Take a look
               <a href="tags.html">around</a>, and enjoy!
            </p>
            <h2>March 7, 2006</h2>
            <p>
               Decided to stop mooching on other people's designs and started
               making my own.  I took some concepts of design from <a href="http://www.oswd.org/design/preview/id/2740" target="_blank">Nautica02</a>
               (the dropshadow/background idea) which was too wide for a
               standard 800x600, and also the tabs come from many influence,
               though is reasonably attributed to the <a href="http://www.mozilla.org/" target="_blank">Mozilla Foundation</a> where
               the tabCSS/position trick was popularized.
            </p>
          </div>
          <div class="bottom"></div>
        </div>
        <div id="right">
          <div class="top"></div>
          <div class="content">
            <h4>Submenu</h4>
            <ul>
              <li><a href="#">SubItem 1</a></li>
              <li><a href="#">SubItem 2</a></li>
              <li><a href="#">SubItem 3</a></li>
              <li><a href="#">SubItem 4</a></li>
            </ul>
            <hr />
            <h4>Quote</h4>
            There's no 'I' in team.<br />
            There's no 'U' in team either.<br />
            If I'm not on the team, and you're not on the team: nobody is on the
            team and the team sucks!<br />
            <hr />
            <h4>Links</h4>
            <ul>
              <li><a href="http://aaron.ganschow.us/" target="_blank">Aaron Ganschow</a></li>
              <li><a href="http://www.wildleaf.net/" target="_blank">Wildleaf</a></li>
              <li><a href="http://www.mozilla.org/" target="_blank">Mozilla</a></li>
            </ul>
          </div>
          <div class="bottom"></div>
        </div>
        <div class="clearer"></div>
      </div>
      <div class="clearer"></div>
    </div>
    <div id="end_body"></div>
    <div id="footer">
      &copy; Copyright <a href="mailto:youremail@server.com">Your
      Name</a> 2006
      | <a href="http://www.ehostinfo.com/">Web Hosting</a></div>
  </body>
</html>

   
    
    
    
    
    
  








Related examples in the same category

1.Adding images and alt message with XHTML
2.Alternative Text Rendering
3.Set background to #fff for an image
4.Set padding to 4px
5.display block
6. in a
7.Set image margin top and left to negative value
8.Image block
9.image clear: left;
10.Switch image for link
11.Adding caption to Image
12.Image as a link
13.Creating an Image Map
14.Top link with image
15.Wrap text along with image
16.Using arrow image for LI
17.Use image to create line
18.Using color image to create round corner
19.Large corner image for the top bar
20.Image slide show
21.Text wrap around image
22.Image side bar
23.Text wrap image
24.Using huge image to highlight your content
25.Image Text wraper
26.Marginal Graphic Dropcap
27.Raised image
28.Lowered text
29.Image with clear left
30.Using css to wrap text around images
31.Image map area
32.HTML Image map
33.Creating and Using Image Maps
34.shape = "rect" indicates a rectangular area, with coordinates for the upper-left and lower-right corners
35.value "poly" creates a hotspot in the shape of a polygon, defined by coords
36.shape = "circle" indicates a circular area with the given center and radius
37. indicates that the specified image map is used with this image
38.Client-side Image Map Example
39.'area' defines the clickable area on a graphic or image
40.'coords' sets the coordinates of an 'a' or 'area' element
41.'galleryimg' eliminate the appearance of the toolbar for all 'img' elements
42.'img' displays a picture or a video clip
43.Adding shading to the picture
44.HTML code for image scaling
45.'ismap': Whether the image in 'img' element is a server-side image map
46.'lowsrc' gives the URL of a low-resolution image
47.'map' specifies the coordinates of an image map
48.'nohref' indicates that the 'area' in the 'map' has no link
49.'shape' sets the shape of an 'a' or 'area' element
50.'src' specifies a URL to be loaded by the element
51.'start' specifies when a video clip should start playing
52.'usemap' sets the image map for the map element
53.'hspace' sets the space in pixels between the left and right sides of an element
54.'vspace' sets the size in pixels of the vertical margins