Hi,

i'm porting a template to drupal, its my very first template-thing i ever do actually.
This is the template: http://www.opensourcetemplates.org/templates/preview/1361070670/
But i'm stuck at how to set 2 side images into style.css

Here's the code in my page.tpl.php:

    <div id="dvnavicontainer">
      <img src="images/navi_left.jpg" alt="" />
      <div id="tabs1" >
        <?php if ($primary_links): ?>
          <div id="primary">
            <?php print theme('links', $primary_links); ?>
          </div>
        <?php endif; ?>
      </div>
      <img src="images/navi_right.jpg" alt="" />
    </div>

And the style.css:


#dvnavicontainer img {
  float:left;
  font-size:0px;
  margin:0px;
  padding:0px 0px 0px 0px;
}

    #tabs1 {
      float:left;
    
	  background:#FAF6DB;
      font-size:15px;
      line-height:normal;
	  font-family:Helvetica, sans-serif;
	  font-weight:bold;
	  padding-top:10px; 
	  padding-bottom:5px;
	  height:26px;
	  margin:0px;
	  line-height:normal;
	  
	   /*   height:100%;Fix for MSIE peekaboo bug */
	 
      }
    #tabs1 ul {
	  margin:0;
	 list-style:none;
	  float:left;
	 padding:0px;
	 
      }
    #tabs1 li {
      display:inline;
      margin:0;
      padding:0;
	  voice-family:"\"}\"";
	  line-height:16px;
	  height:25px;
	  float:left;
	  
	  
      }
    #tabs1 a {
      float:left;
      background:url("images/tableft1.gif") no-repeat left top;
      margin:0;
      padding:0 0 0 4px;
      text-decoration:none;
	  
      }
    #tabs1 a span {
      float:left;
      display:block;
      background:url("images/tabright1.gif") no-repeat right top;
	  color:#2C1C0F;
      padding:3px 9px 6px 5px; 
	  voice-family:"\"}\"";
	  padding-top:2px;
	  
	  
	
	  
	
     
      }
    /* Commented Backslash Hack hides rule from IE5-Mac \*/
    #tabs1 a span {float:none;}
    /* End IE5-Mac hack */
    #tabs a:hover span {
      color:#FFFFFF;
	  
      }
    #tabs1 a:hover {
      background-position:0% -42px;
	   color:#FFFFFF;
      }
    #tabs1 a:hover span {
      background-position:100% -42px;
	   color:#FFFFFF;
      }

      #tabs1 #current a {
      	background-position:0% -42px;
		 color:#FFFFFF;
      }
      #tabs1 #current a span {
      	background-position:100% -42px;
		 color:#FFFFFF;
      }

As you can see, there are 2 images on the left and right hardcoded in the page.tpl.php
Now i want them into the style.css, so that the images can be found always.
Can someone show me how this is done?

Many thanx!
Tom

Comments

dawehner’s picture

  <div id="dvnavicontainer">
    <div id="dvnavicontainer_inner">
      <div id="tabs1" >
        <?php if ($primary_links): ?>
          <div id="primary">
            <?php print theme('links', $primary_links); ?>
          </div>
        <?php endif; ?>
      </div>
    </div>
  </div>

the css

  #dvnavicontainer {
    background-image. the first image
  }

  #dvnavicontainer_inner {
    background-image. the second image
  }

----------------------------------------
German IRC-Channel: irc.freenode.net #drupal.de ... Jabber-me: dwehner@im.calug.de

alexrayu’s picture

Yes, the idea is basically to use a wrapper dive for the other image.

BTW, a good job on a template that you built. You're saying your first template??? You have talent. If you have questions, ask and we'll help you.

- Alexei Rayu.

Drupal Related Services | SiteHound 2.3 (based on Drupal 6.5) - Drupal for Beginners! Please test and comment.