SMF Support > Hilfe zu SMF (German)
wie zentriere ich etwas zwischen links & rechts? ERLEDIGT!!!
(1/1)
norbert schmidt:
so, neues Problem...habe einen mini Top_Bar
links habe ich ein bild und einen link (nachrichten)
rechts habe ich quicksearch
in die mitte soll nun noch der "Login oder Register" -link(s)
Bekomme bei all den versuchen aber nur hin, das der loginlink gleich hinter den Nachrichtenlink auftaucht.
kann wer helfen?
hier der jetzige Codeschnippsel in der template
--- Code: --- echo '
<div class="top_bar">
<div class="top_bar_inner" ', !empty($settings['forum_width']) ? 'style="width: '. $settings['forum_width'] . '"' : '' ,'>
<div class="top_bar_guts">
<div class="floatleft">
<a href="', $scripturl ,'?action=pm"><img src="', $settings['images_url'] ,'/messages_icon.png" alt="Messages" /> ', $context['user']['messages'] ,' Nachrichten, ', $context['user']['unread_messages'] ,' ungelesen</a>
</div>
<div class="center">
<a href="', $scrpiturl ,'?action=login">Login</a> oder <a href="', $scripturl ,'?action=register">Registrieren</a></center>
<div class="floatright">
<div class="middle_quick_search">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo ' </form>
</div>
</div>
</div>
</div>
</div>
--- End code ---
wer findet den fehler?
DeVIL-I386:
Wenn das mit <div class="center"> beginnt, darf das nicht mit </center> enden. Statt </center> müsste da </div> stehen.
Also richtig wäre:
--- Code: ---<div class="center">
<a href="', $scrpiturl ,'?action=login">Login</a> oder <a href="', $scripturl ,'?action=register">Registrieren</a></div>
--- End code ---
oder auch:
--- Code: ---<center>
<a href="', $scrpiturl ,'?action=login">Login</a> oder <a href="', $scripturl ,'?action=register">Registrieren</a></center>
--- End code ---
Sollte keins von beiden zum gewünschten Ergebnis führen, ist das noch ein Versuch wert:
--- Code: ---<table align="center"><tbody><tr><td>
<a href="', $scrpiturl ,'?action=login">Login</a> oder <a href="', $scripturl ,'?action=register">Registrieren</a></td></tr></tbody></table>
--- End code ---
norbert schmidt:
danke sehr
Navigation
[0] Message Index
Go to full version