Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Layout wird nicht richtig angezeigt

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Mon Nov 28, 2011 2:20 pm    Post subject: Layout wird nicht richtig angezeigt Reply with quote

Hallo,

ich habe folgendes Problem. Ich habe mir heute ein Design gekauft und wollte es an smarty anpassen doch jetzt verschiebt smarty mir mein ganzes Design!

so sollte es aussehen:
http://imageshack.us/photo/my-images/442/86324837.jpg/

so sieht es aber aus..

http://imageshack.us/photo/my-images/141/93038876.jpg/
Es ist ein CSS-Design.

ich hoffe Ihr könnt mir helfen..

MfG Thomas[url][/url]
Back to top
View user's profile Send private message
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Tue Nov 29, 2011 9:39 am    Post subject: Reply with quote

Smarty verändert weder etwas an der CSS noch an HTML.
Treten also Abweichungen auf ist das immer selbstgestrickt,d.h. CSS und HTML vergleichen.
Back to top
View user's profile Send private message Visit poster's website
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Tue Nov 29, 2011 12:45 pm    Post subject: Reply with quote

aber wenn ich das Design ohne smarty öffne, wird es korrekt angezeigt, nur wenn ich es mit php $smarty-display öffne wird mir alles verschoben!
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4176
Location: Hamburg / Germany

PostPosted: Thu Dec 01, 2011 11:15 am    Post subject: Reply with quote

Vergleiche im Browser für beide Fälle den HTML Quelltext um festzstellen wo die Unterschiede liegen.
Back to top
View user's profile Send private message
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Fri Jan 06, 2012 7:24 pm    Post subject: Reply with quote

sehe keinen unterschied....
es muss an Smarty liegen. mach ich es mit einem selbst geschriebenen template-Sys funktionert es, öffne ich es mit Smarty in sämmtlichen Browsern(chrome, IE, FF) wird mir das Design zerissen...

Quote:
<!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">
<head>
<title>Smooth Admin</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!-- stylesheets -->
{literal}
<link rel="stylesheet" type="text/css" href="./templates/designs/smooth/resources/css/reset.css" />
<link rel="stylesheet" type="text/css" href="./templates/designs/smooth/resources/css/style.css" media="screen" />
<link id="color" rel="stylesheet" type="text/css" href="./templates/designs/smooth/resources/css/colors/red.css" />
{/literal}
<!-- scripts (jquery) -->
<script src="./templates/designs/smooth/resources/scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="./templates/designs/smooth/resources/scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="./templates/designs/smooth/resources/scripts/smooth.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
style_path = "resources/css/colors";

$("input.focus").focus(function () {
if (this.value == this.defaultValue) {
this.value = "";
}
else {
this.select();
}
});

$("input.focus").blur(function () {
if ($.trim(this.value) == "") {
this.value = (this.defaultValue ? this.defaultValue : "");
}
});

$("input:submit, input:reset").button();
});
</script>
</head>
<body>
<div id="login">
<!-- login -->
<div class="title">
<h5>Login Admin Center</h5>
<div class="corner tl"></div>
<div class="corner tr"></div>
</div>
{$test}
<div class="inner">
<form action="index.html" method="get">
<div class="form">
<!-- fields -->
<div class="fields">
<div class="field">
<div class="label">
<label for="username">Benutzername:</label>
</div>
<div class="input">
<input type="text" id="Benutzername" name="Benutzername" size="40" value="" class="focus" />
</div>
</div>
<div class="field">
<div class="label">
<label for="password">Kennwort:</label>
</div>
<div class="input">
<input type="password" id="Kennwort" name="Kennwort" size="40" value="" class="focus" />
</div>
</div>
<div class="field">
<div class="checkbox">
<input type="checkbox" id="remember" name="remember" />
<label for="remember">Anmeldedaten merken?</label>
</div>
</div>
<div class="buttons">
<input type="submit" value="Sign In" />
</div>
</div>
<!-- end fields -->
<!-- links -->
<div class="links">
<a href="index.html">Kennwort vergessen?</a>
</div>
<!-- end links -->
</div>
</form>
</div>
<!-- end login -->
</div>
</body>
</html>
Back to top
View user's profile Send private message
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Fri Jan 06, 2012 10:37 pm    Post subject: Reply with quote

Die CSS gehört nicht in literal eingebunden, aber das darunter liegende Javascript schon.
Back to top
View user's profile Send private message Visit poster's website
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Sun Jan 08, 2012 1:29 pm    Post subject: Reply with quote

ja hab ich, bringt trotzdem nichts...

http://www.smarty.net/forums/viewtopic.php?p=43661

hab ich mir auch schon durchgelesen, funktioniert aber auch nichts davon -.-
Back to top
View user's profile Send private message
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Sun Jan 08, 2012 5:33 pm    Post subject: Reply with quote

Also nochmals Smarty verändert weder etwas an HTML noch an CSS.

Ein genauer Vergleich hilft, ebenso, das bei einer Änderung templates_c und/oder cache gelöscht wird, da man sonst u.U. immer den alten Kram sieht (je nach Einstellung).

Kommt man mit solch einfachen Kram nicht klar sollte man sich überlegen ob nicht etwas fertiges eingesetzt werden kann.
Back to top
View user's profile Send private message Visit poster's website
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Mon Jan 09, 2012 10:59 am    Post subject: Reply with quote

Mir fällt auf das dein Javascript den css Path verändert.
Entferne das mal probeweise.
Back to top
View user's profile Send private message Visit poster's website
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Wed Jan 11, 2012 10:16 pm    Post subject: Reply with quote

hab den fehler jetzt gefunden, ich weis nicht warum aber Smarty hat ein Proglem mit meinem PHP code... wenn ich den folgenden Code raus mache gehts, kommentier ich den PHP code aus gehts, mach ich den Array wieder rein verschiebt's mir wieder alles -.-

Code:


<?php
//dieser array verschiebt mir alles, vll ne ahnung warum?   
$datei = array();
$datei['error'] = "pages/error.php";
$datei['ueberpruefen'] = "ueberpruefen.php";

//das kann ich drin lassen ohne das mir was verschoben wird.
if(isset($_GET['seite']) AND isset($datei[$_GET['seite']])){
   include $datei[$_GET['seite']];
}
else{
   include $datei['ueberpruefen'];
}

?>
Back to top
View user's profile Send private message
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Wed Jan 11, 2012 11:14 pm    Post subject: Reply with quote

Ich sehe in dem Code rein nichts was auch nur entfernt mit Smarty zu tun hat.
Back to top
View user's profile Send private message Visit poster's website
Quantix
Smarty Rookie


Joined: 28 Nov 2011
Posts: 6

PostPosted: Wed Jan 11, 2012 11:26 pm    Post subject: Reply with quote

ja das denk ich mir auch, aber sobald der code in der PHP seite drin ist, zersprenngts mir das design -.-
Back to top
View user's profile Send private message
jacz
Smarty Pro


Joined: 13 Nov 2010
Posts: 249

PostPosted: Wed Jan 11, 2012 11:33 pm    Post subject: Reply with quote

Das kann dann nur etwas mit den Innereien deines PHP Codes zu tun haben aber rein nichts mit Smarty.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP