Jump to content

images are not showing up in div's


Furt

Recommended Posts

Im using a custom template system i made for my website that im building but css is not showing images in div's when the site is parsed.

the only image that is show is the body background-image.

style.css

body {
background-attachment: fixed;
background-color: #000;
background-image: url(../images/bg.jpg);
background-repeat: no-repeat;
background-position: center top;
}
.logo {
background-attachment: fixed;
background-image: url(../images/logo.jpg);
background-repeat: no-repeat;
background-position: center top;
width:632;
height:124;
margin-left:auto;
margin-right:auto;
}

im using tpl's if that might be the prob

 

fopen function

		public function openfiletmp($file) {

		$handle = fopen($file, "r");
		$contents = fread($handle, filesize($file));
		fclose($handle);
		return $contents;
	}

 

str_replace function

	public function streplace($txt, $opt, $html) {

		$streplace = str_replace($opt, $txt, $html); 
		return $streplace;
	}

 

header.tpl

<!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=utf-8" />
<title>{title}</title>
<link rel="shortcut icon" href="includes/images/favicon.ico" />
<link type="text/css" rel="stylesheet" href="templates/basic/css/style.css" />
<script type="text/javascript" src="includes/js/jquery.js"></script>
</head>
<body>
<div class="logo"></div>

 

open tpl's

$maintemplate	= $tmpl->openfiletmp('templates/'.template.'/theme.tpl');
$headerfile		= $tmpl->openfiletmp('templates/'.template.'/theme/header.tpl');
$footerfile		= $tmpl->openfiletmp('templates/'.template.'/theme/footer.tpl');

 

parse

$footer			= $tmpl->streplace(footerwrite." - Made by Furt <br> Page Created in :".number_format($time, 4, '.', '')."s.",'{copywrite}', $footerfile);
$headtitle		= $tmpl->streplace(headtitle,'{title}', $headerfile);
$headname		= $tmpl->streplace(sitename,'{servername}',  $headtitle)
$parseheader  	= $tmpl->streplace($headname,'{header}', $maintemplate);
$centercontent 	= $tmpl->streplace(content($_GET['pageid']),'{content}', $parseheader);
$parsefooter 	        = $tmpl->streplace($footer,'{footer}', $centercontent);

//print page
echo $parsefooter;

 

Any ideas on why the body background is showing and the logo div is not?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.