Forum-Menü umordnen und zentrieren - wie ?

original Thema anzeigen

 
24.02.14, 14:47:34

Lighty

... was hast du denn jetzt verändert !?

Kannst du den Quelltext der "head_menu" hier mal komplett einstellen !?
24.02.14, 14:48:39

logen

Code:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
<div class="space" id="header">

<if( !empty($_style->cfg['logo']) )>
<a href="http://sxe.bplaced.net/"><img src="{$_style->cfg['logo']}" alt="$_config[TITEL_KURZ]" /></a>
<else>
<h1>$_config[TITEL_KURZ]</h1>
</if>

</div>

<div id="menu" class="clearfix">
<ul>

<if( !empty($_style->login) )>
<a href="$_cfg[SITE]/index.php?$_sess[url]"><img src="{$_style->cfg['images']}/forum.png" alt="" /></a>
<a href="$_cfg[SITE]/user.php?$_sess[url]"><img src="{$_style->cfg['images']}/profil.png" alt="" /></a>
<else>
<a href="$_cfg[SITE]/signup.php?$_sess[url]"><img src="http://sxe.bplaced.net/images/default/newtopic.png"><#lng_menu_signup#></a>
</if>

<a href="$_cfg[SITE]/members.php?$_sess[url]"><img src="{$_style->cfg['images']}/userliste.png" alt= /></a>
<a href="$_cfg[SITE]/team.php?$_sess[url]"><img src="{$_style->cfg['images']}/team.png" alt="" /></a>
<a href="$_cfg[SITE]/search.php?$_sess[url]"><img src="{$_style->cfg['images']}/suche.png" alt="" /></a>
<if( !empty($_style->admin) )>
<a href="$_cfg[SITE]/admin/index.php?$_sess[url]"><img src="{$_style->cfg['images']}/admin.png" alt="" /></a>
</if>

</ul>

</div>
<div class="space" style="height: 0px; clear: both;"> </div>
24.02.14, 15:22:47

Lighty

... das <li> </li> muss rein !
Zitat:
Line 38, Column 44: document type does not allow element "a" here; assuming missing "li" start-tag

<ul>
<li>
.
.
.
</li>
</ul>

Der Freiraum kommt wohl aus der *.css !
Da wird links und rechts ein margin gesetzt !
Zitat:
margin: 4px 10px 0 10px;

... versuche mal margin: 4px 0 0 0;
( #menu a:link, #menu a:visited )
24.02.14, 15:28:25

logen

Beitrag geändert von: logen - 24.02.14, 15:29:20

Okay, das <li></li> hab ich wieder drin und habs in der CSS geändert, hat sich auch etwas geändert, jetzt ist der Abstand nicht mehr so groß wie vorher zwischen den Buttons. Ein kleiner Abstand ist aber immer noch da, den ich gern geschlossen hätte. :smile:
24.02.14, 15:33:38

logen

haha, okay. Jetzt ist es perfekt. :D

Code:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
<div class="space" id="header">

<if( !empty($_style->cfg['logo']) )>
<a href="http://sxe.bplaced.net/"><img src="{$_style->cfg['logo']}" alt="$_config[TITEL_KURZ]" /></a>
<else>
<h1>$_config[TITEL_KURZ]</h1>
</if>

</div>
<li>
<div id="menu" class="clearfix">
<ul>

<if( !empty($_style->login) )>
<a href="$_cfg[SITE]/index.php?$_sess[url]"><img src="{$_style->cfg['images']}/forum.png" alt="" /></a><a href="$_cfg[SITE]/user.php?$_sess[url]"><img src="{$_style->cfg['images']}/profil.png" alt="" /></a><else><a href="$_cfg[SITE]/signup.php?$_sess[url]"><img src="http://sxe.bplaced.net/images/default/newtopic.png"><#lng_menu_signup#></a>
</if><a href="$_cfg[SITE]/members.php?$_sess[url]"><img src="{$_style->cfg['images']}/userliste.png" alt= /></a><a href="$_cfg[SITE]/team.php?$_sess[url]"><img src="{$_style->cfg['images']}/team.png" alt="" /></a><a href="$_cfg[SITE]/search.php?$_sess[url]"><img src="{$_style->cfg['images']}/suche.png" alt="" /></a><if( !empty($_style->admin) )><a href="$_cfg[SITE]/admin/index.php?$_sess[url]"><img src="{$_style->cfg['images']}/admin.png" alt="" /></a>
</if>
</li>
</ul>

</div>
<div class="space" style="height: 0px; clear: both;"> </div>
24.02.14, 15:38:18

Lighty

... jüpp, war ja schon besser - fehlte nur noch der Zeilenumbruch ! ;)

Der li-Start-Tag muss aber unter den ul-Start-Tag ! ;)
24.02.14, 15:40:14

logen

Okay, habs geändert.

Wieso muss er unter dem ul?
24.02.14, 15:45:10

Lighty

... weil es dann nicht valide ist und es Browser gibt, die das dann falsch darstellen / anzeigen !

Aktuell: Result: 7 Errors

Zitat:
<img src="/images/default/userliste.png" alt= />

<img src="/images/default/userliste.png" alt="" />

... beim Endtag war es richtig - also wieder ändern ! ;)
</li>
</ul>

... und du solltest die Grafiken vllt. nicht extern lagern ! ;)
24.02.14, 15:56:04

logen

Okay, hab beides geändert.^^

Die Grafiken hab ich im Ordner "images" gelagert.
24.02.14, 16:01:47

Lighty

... ok, aktuell - Result: 3 Errors
Zitat:
end tag for element "if" which is not open

( ich schau mal was das noch ist ) ;)

Zitat von logen:
Die Grafiken hab ich im Ordner "images" gelagert.

... ok, du musst dann aber auch die *.css ändern/anpassen !
24.02.14, 16:03:27

logen

Was muss ich da ändern? :shock:
24.02.14, 16:17:21

Lighty

... müsste in der index.tpl sein - Zeile 45 ...
Sieht im Original so aus:

Zitat:
[<if( isset($pns['count']) && $pns['count'] > 0 )><a href="private.php?$_sess[url]"><#lng_index_new_pns#></a> | </if><if( !empty($_style->login) )><a href="functions.php?action=readabo&$_sess[url]"><#lng_read_all#></a> | </if><a href="attachments.php?$_sess[url]"><#lng_title_attachments#></a><if( $_config['RSS_ACTIVE'] )> | <a href="rss.php" target="_blank"><#lng_rss_newsfeed#></a></if>]