News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[Tip/Trick] Center Nav Menu Bar (1.x and 2.x)

Started by Yigal, August 04, 2009, 02:30:32 AM

Previous topic - Next topic

knightofdoom

Glory is fleeting, but obscurity is forever.
Web Designer Sri Lanka


Aportadordelmix


Yigal

Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

gmbhneo

Hmm .. i got the problem that i cant find your part of code in my index.template...

the only thiung ive found is:
// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.png" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.png" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[119]), '</a>', $context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.png" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[182]), '</a>', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.png" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.png" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.png" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.png" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0"; align="center" />' : $txt[108]), '</a>';
}

// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}

?>


Is there any outher way to center the buttons?
Visit my Board at: http://www.neos-shell.de

Yigal

My codes are definetly outdated.  I'm not sure if there are any other codes around for centering your navigation.  But for sure, there should be somewhere.  Try searching the community.

Sorry.
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

Antechinus

Would have to see the rest of the template to know how the container for the menu was coded in that theme. Codes in this thread are only for the default theme.

gmbhneo

Thx for the quick anwsers! Here are the index.template and the css file ... i hope this is what you need?!

http://www.mediafire.com/file/cvze3nv4j8ubp9w/Desktop.zip
Visit my Board at: http://www.neos-shell.de

Yigal

Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods

alios

hey guys can you tell me where to modify so i can increase the font size in the menu bar ??

i-ve searched the style.css and index.template.php and no luck :(

pearpandas

Thanks, I will be implementing this later today.

Yigal

Quote from: alios on March 27, 2011, 04:35:06 PM
hey guys can you tell me where to modify so i can increase the font size in the menu bar ??

i-ve searched the style.css and index.template.php and no luck :(

You should post in the Graphics & Templates board.

Quote from: pearpandas on March 28, 2011, 12:08:03 PM
Thanks, I will be implementing this later today.

You're welcome! :)
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods


re1lazz

Need help...
Have problem that i cant find part of code in my index.template.php...

My index.template.php
<?php
// Version: 2.0 RC3; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC3';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!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"'
$context['right_to_left'] ? ' dir="rtl"' '''>
<head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' 
$context['meta_keywords'] . '" />' '''
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="'
$context['canonical_url'], '" />';

// The ?rc3 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/index'$context['theme_variant'], '.css?rc3" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?rc3" media="print" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="'
$scripturl'?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7''ie6''webkit') as $cssfix)
if ($context['browser']['is_' $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/'$cssfix'.css" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/rtl.css" />';

echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?rc3"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?rc3"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' 
$txt['from'] . ' ' $context['pm_informer']['sender'] . '\\n' $txt['subject'] . ' ' $context['pm_informer']['subject'] . '\\n' $txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

echo '
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
<div id="bodybg">
<div id="wrapper">
<div id="shad-l">
<div id="shad-r">
<div id="header">
<div id="head-l">
<div id="head-r">
<div id="userarea" class="smalltext">'
;
if ($context['user']['is_logged'])
{
echo '
<b>'
$txt['hello_member_ndt'], ' '$context['user']['name'], '</b><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';

echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_guest'], $txt['guest_title']);

echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/sha1.js"></script>
<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user"  size="10" />
<input type="password" name="passwrd"  size="10" />
<input type="submit" value="'
$txt['login'], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
$context['current_time'],'<br />';
}

echo '
</div>
<div id="searcharea">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
<input type="text" name="search" value="'
$txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\''$txt['search'], '...\';" /> ';

// 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>
<a href="'
.$scripturl.'" title=""><span id="logo">&nbsp;</span></a>';
echo '
</div>
</div>
</div>
<div id="toolbar">
'
,template_menu(),'
</div>
<div id="bodyarea">'
;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//echo 
echo '<BR>';
include 'adverts1.php';
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Show the navigation tree.
theme_linktree();
}

function 
template_body_below()
{

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//echo 
include 'adverts2.php';
echo '<BR>';
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

global $context$settings$options$scripturl$txt$modSettings;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer">
<div id="foot-l">
<div id="foot-r">
<div id="footerarea">
<span class="smalltext">'
theme_copyright(), '
<br /><a href="http://www.photojamaica.net"><b>PhotoJamaica.net &copy; 2010</b></a> | Theme by <a href="http://www.dzinerstudio.com" target="_blank"><b>DzinerStudio</b></a> | '
, !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<a id="button_rss" href="' $scripturl '?action=.xml;type=rss" class="new_win"><span>' $txt['rss'] . '</span></a>' ''' | <a id="button_wap2" href="'$scripturl '?wap2" class="new_win"><span>'$txt['wap2'], '</span></a></span>';

// Show the load time?
if ($context['show_load_time'])
echo '<br /><span class="smalltext">'$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';

echo '
</div>
</div>
</div>
</div>
</div>
</div>
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
try {
_uacct = "UA-15421433-1";
urchinTracker();
} catch(err) {}</script>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="navigate_section">
<ul>'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] . '</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &#38;#38;#187;';

echo '
</li>'
;
}
echo '
</ul>
</div>'
;

$shown_linktree true;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<div id="topmenu">
<ul>'
;

foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';

echo '
</ul>
</div>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$strip_options = array())
{
global $settings$context$txt$scripturl;

if (!is_array($strip_options))
$strip_options = array();

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '
<li><a' 
. (isset($value['id']) ? ' id="button_strip_' $value['id'] . '"' '') . ' class="button_strip_' $key '' . (isset($value['active']) ? ' active' '') . '" href="' $value['url'] . '"' . (isset($value['custom']) ? ' ' $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a></li>';
}

// No buttons? No button strip either.
if (empty($buttons))
return;

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, !empty($direction) ? ' align_' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>'
,
implode(''$buttons), '
</ul>
</div>'
;
}

?>



Theme by Crip

re1lazz

My index.css

#main_menu {
   float:left;
   width:100%;
   background: none;
   overflow:hidden;
   position:relative;
}
#main_menu ul {
   clear:left;
   float:left;
   list-style:none;
   margin:0;
   padding:0;
   position:relative;
   left:50%;
   text-align:center;
}
li.main_menu_first {
   width: 8px;
   height: 20px;
   background: url(../images/maintab_first.gif) no-repeat bottom left;
}
#main_menu ul li {
   display:block;
   float:left;
   list-style:none;
   margin:0;
   padding:0;
   position:relative;
   right:50%;
}
#main_menu ul li a {
   display:block;
   color: white;
   font-size: 0.8em;
   font-family: tahoma, sans-serif;
   text-transform: uppercase;
}
#main_menu li a span
{
background: url(../images/maintab_back.gif) repeat-x bottom left;
display: block;
padding: 0.1em 0.5em 0.5em 0.5em;
}
#main_menu li.last a span
{
background: url(../images/maintab_last.gif) no-repeat bottom right;
padding: 0.1em 1em 0.5em 0.5em;
}
#main_menu li.active a span em
{
padding: 0.1em 0.5em 0.5em 0.5em;
display: block;
font-style: normal;
background: url(../images/maintab_active_back.gif) repeat-x bottom right;
}
#main_menu li.active a span
{
background: url(../images/maintab_active_first.gif) no-repeat bottom left;
padding: 0 0 0 8px;
}
#main_menu li.last.active
{
float: left;
background: url(../images/maintab_last.gif) no-repeat bottom right;
padding: 0 8px 0 0;
}
#main_menu li.active a
{
background: url(../images/maintab_active_last.gif) no-repeat bottom right;
padding-right: 8px;
}
.dropmenu, .dropmenu ul
{
list-style: none;
line-height: 1em;
padding: 0;
margin: 0;
}
.dropmenu
{
padding: 0 0.5em;
}
.dropmenu a
{
display: block;
color: #000;
text-decoration: none;
}
.dropmenu a span
{
display: block;
padding: 0 0 0 5px;
font-size: 0.9em;
}
/* the backgrounds first level only*/
.dropmenu li a.firstlevel
{
margin-right: 8px;
}
.dropmenu li a.firstlevel span.firstlevel
{
display: block;
position: relative;
left: -5px;
padding-left: 5px;
height: 22px;
line-height: 19px;
}
.dropmenu li
{
float: left;
padding: 0;
margin: 0;
position: relative;
}
.dropmenu li ul
{
z-index: 90;
display: none;
position: absolute;
width: 19.2em;
font-weight: normal;
border-bottom: 1px solid #999;
background: url(../images/theme/menu_gfx.png) 0 -100px no-repeat;
padding: 7px 0 0 0;
}
.dropmenu li li
{
width: 19em;
margin: 0;
border-left: 1px solid #999;
border-right: 1px solid #999;
}
.dropmenu li li a span
{
display: block;
padding: 8px;
}
.dropmenu li ul ul
{
margin: -1.8em 0 0 13em;
}

/* the active button */
.dropmenu li a.active
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% 0;
color: #fff;
font-weight: bold;
}
.dropmenu li a.active span.firstlevel
{
background: url(../images/theme/menu_gfx.png) no-repeat 0 0;
}
/* the hover effects */
.dropmenu li a.firstlevel:hover, .dropmenu li:hover a.firstlevel
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% -30px;
color: #fff;
cursor: pointer;
text-decoration: none;
}
.dropmenu li a.firstlevel:hover span.firstlevel, .dropmenu li:hover a.firstlevel span.firstlevel
{
background: url(../images/theme/menu_gfx.png) no-repeat 0 -30px;
}
/* the hover effects on level2 and 3*/
.dropmenu li li a:hover, .dropmenu li li:hover>a
{
background: url(../images/theme/main_block.png) no-repeat -10px -160px;
color: #000;
text-decoration: none;
}
.dropmenu li:hover ul ul, .dropmenu li:hover ul ul ul
{
top: -999em;
}
.dropmenu li li:hover ul
{
top: auto;
}
.dropmenu li:hover ul
{
display: block;
}
.dropmenu li li.additional_items
{
background-color: #fff;
}

/* The dropdown menu toggle image */
#menu_toggle
{
float: right;
margin-right: 10px;
padding-top: 3px;
}
#menu_toggle span
{
position: relative;
right: 5000px;
}

/* Styles for the standard button lists.
------------------------------------------------------- */

.buttonlist ul
{
z-index: 100;
padding: 5px;
margin: 0 0.2em 0 0;
}
.buttonlist ul li
{
margin: 0;
padding: 0;
list-style: none;
float: left;
}
.buttonlist ul li a
{
display: block;
font-size: 0.8em;
color: #000;
background: url(../images/theme/menu_gfx.png) no-repeat 0 -60px;
padding: 0;
margin-left: 12px;
text-transform: uppercase;
cursor: pointer;
}
.buttonlist ul li a:hover
{
background: url(../images/theme/menu_gfx.png) no-repeat 0 0;
color: #fff;
text-decoration: none;
}
.buttonlist ul li a span
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% -60px;
display: block;
height: 24px;
line-height: 20px;
padding: 0 8px 0 0;
position: relative;
right: -8px;
}
.buttonlist ul li a:hover span
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% 0;
}
/* the active one */
.buttonlist ul li a.active
{
background: url(../images/theme/menu_gfx.png) no-repeat 0 -30px;
color: #fff;
font-weight: bold;
}
.buttonlist ul li a.active span
{
background: url(../images/theme/menu_gfx.png) no-repeat 100% -30px;
}
.buttonlist ul li a.active
{
font-weight: bold;
}
.buttonlist ul li a.active:hover
{
color: #ddf;
}
.align_top ul li a, .align_bottom ul li a
{
margin: 0 12px 0 0;
}

/* the navigation list */
ul#navigation
{
margin: 0;
font-size: 0.9em;
padding: 1em 0.4em;
}
ul#navigation li
{
float: none;
font-size: 0.95em;
display: inline;
}

#adm_submenus
{
padding-left: 2em;
overflow: hidden;
}

/* Styles for the general looks for the Curve theme.
------------------------------------------------------- */

/* the content section */
#content_section
{
background: repeat-y top left;
padding-left: 20px;
}
#content_section div.frame
{
background: repeat-y top right;
display: block;
padding: 0 20px 0 0;
}
#main_content_section
{
width: 100%;
min-height: 200px;
}

/* the main title, always stay at 45 pixels in height! */
h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;
}
/* float these items to the right */
#siteslogan, img#smflogo
{
margin: 0;
padding: 0;
float: right;
line-height: 3em;
}
h3, h4
{
padding-bottom: 3px;
}
/* the upshrink image needs some tweaking */
img#upshrink
{
float: right;
margin: 1em;
}
/* ..so does the SMF logo */
img#smflogo
{
margin-left: 1em;
}
/* the upper_section, float the two each way */
#upper_section
{
padding: 5px;
margin-bottom: 1.5em;
}
#upper_section ul li.greeting
{
font-size: 1.3em;
font-weight: bold;
line-height: 1.5em;
}
#upper_section div.news
{
width: 50%;
float: right;
text-align: right;
}
#guest_form
{
overflow: hidden;
}
#guest_form .info
{
padding: 4px 0 ;
}
div#upper_section div.user
{
width: 50%;
float: left;
overflow: auto;
}
div#upper_section div.user p
{
float: left;
margin: 0 1em 1em 0;
padding: 0;
}
div#upper_section div.user ul
{
margin: 0;
padding-left: 10px;
}
div#upper_section div.user ul li
{
margin-bottom: 2px;
}
div#upper_section div.news p
{
display: inline;
}
div#upper_section div.news form
{
padding-bottom: 10px;
}
/* clearing the floats */
#top_section
{
min-height: 65px;
overflow: hidden;
margin-bottom: 3px;
}
#upper_section
{
overflow: hidden;
}

/* The navigation list (i.e. linktree) */
.navigate_section
{
padding: 0.5em;
margin: 0 0 0 0;
}
.navigate_section ul
{
display: block;
margin: 0;
font-size: 0.9em;
padding: 1em 0 0.5em 0;
border-top: 1px solid #ccc;
overflow: hidden;
list-style: none;
clear: both;
width: 100%;
}
.navigate_section ul li
{
float: left;
padding: 0 0.5em 0 0;
font-size: 0.95em;
}

/* The footer wih copyright links etc. */
#footer_section
{
text-align: center;
background: url(../images/theme/main_block.png) no-repeat 0 -820px;
padding-left: 20px;
}
#footer_section span.smalltext
{
font-size: 100%;
}
#footer_section div.frame
{
background: url(../images/theme/main_block.png) no-repeat 100% -820px;
display: block;
padding: 60px 0 0 0;
}
#footer_section ul li, #footer_section p
{
font-size: 0.8em;
}
#footer_section ul li
{
display: inline;
padding-right: 5px;
}
#footer_section ul li.copyright
{
display: block;
}
select.qaction, input.qaction
{
font-size: 0.85em;
padding: 0;
}
#mlist table tbody td.windowbg2
{
text-align: center;
}

/* Styles for a typical table.
------------------------------------------------------- */
table.table_list
{
width: 100%;
}
table.table_list p
{
padding: 0;
margin: 0;
}
table.table_list td, table.table_list th
{
padding: 5px;
}
table.table_list tbody.header td
{
padding: 0;
}
table.table_list tbody.content td.stats
{
font-size: 90%;
width: 15%;
text-align: center;
}
table.table_list tbody.content td.lastpost
{
line-height: 1.3em;
font-size: 85%;
width: 24%;
}
table.table_list tbody.content td.icon
{
text-align: center;
width: 6%;
}

/* Styles for the board index.
------------------------------------------------- */

/* the board title! */
.table_list tbody.content td.info a.subject
{
font-weight: bold;
font-size: 110%;
color: #111;
}
.table_list tbody.content td.children
{
color: #555;
font-size: 85%;
}
p.moderators
{
font-size: 0.8em;
font-family: verdana, sans-serif;
}
/* hide the table header/footer parts - but its here for those needing to style it */
#boardindex_table .table_list thead, #boardindex_table .table_list tfoot
{
display: none;
}

/* the posting icons */
#posting_icons
{
padding: 0 1em 0.5em 1em;
margin: 0 0 1em 0;
line-height: 1em;
}
#posting_icons ul
{
font-size: 0.8em;
}
#posting_icons img
{
vertical-align: middle;
margin: 0 0 0 4ex;
}
#postbuttons_upper ul li a span
{
line-height: 19px;
padding: 0 0 0 6px;
}
.nextlinks
{
text-align: right;
margin-top: -1px;
}
.nextlinks_bottom
{
clear: right;
text-align: right;
}
.mark_read
{
padding: 0 0.5em;
}

/* the newsfader */
#newsfader
{
margin: 0 2px;
}
#smfFadeScroller
{
text-align: center;
padding: 0 2em;
overflow: auto;
margin: 1em 0;
color: #575757; /* shouldn't be shorthand style due to a JS bug in IE! */
}

/* Styles for the info center on the board index.
---------------------------------------------------- */

#upshrinkHeaderIC
{
margin-top: 4px;
}
dl#ic_recentposts
{
margin: 0 0 0.5em 0;
padding: 0.5em;
line-height: 1.3em;
}
dl#ic_recentposts dt
{
float: left;
}
dl#ic_recentposts dd
{
text-align: right;
}
#upshrinkHeaderIC p
{
margin: 0 0 0.5em 0;
padding: 0.5em;
}
#upshrinkHeaderIC p.last
{
margin: 0;
padding: 0.5em;
border-top: 2px dotted #bbb;
}
#upshrinkHeaderIC p.inline
{
border: none;
margin: 0;
padding: 0.2em 0.5em 0.2em 0.5em;
}
#upshrinkHeaderIC p.stats
{
font-size: 1.1em;
padding-top: 8px;
}
form#ic_login
{
padding: 0.5em;
height: 2em;
}
form#ic_login ul li
{
margin: 0;
padding: 0;
float: left;
width: 20%;
text-align: center;
}
form#ic_login ul li label
{
display: block;
}

/* the small stats */
#index_common_stats
{
display: block;
margin: 0 0 0.5em 0;
text-align: right;
font-size: 0.9em;
position: relative;
top: -20px;
line-height: 1px;
}

img.new_posts
{
padding: 0 0.1em;
}
/* Styles for the message (topic) index.
---------------------------------------------------- */
div.table_frame .table_list
{
border-collapse: collapse;
margin: 2px 0;
}
.table_frame .table_list td.icon, .table_frame .table_list td.info, .table_frame .table_list td.stats
{
border-right: 2px solid white;
}
#messageindex
{
clear: both;
}
/* the page navigation area */
.childboards
{
margin-bottom: 0.2em;
}
#childboards h3
{
padding-bottom: 0;
}
#childboards .table_list thead
{
display: none;
}
#childboards .table_list
{
margin-bottom: 1em;
}
.lastpost img
{
float: right;
padding: 4px;
}

/* Styles for the display template (topic view).
---------------------------------------------------- */

#postbuttons div.buttons
{
padding: 0.5em;
width: 40%;
float: right;
}
#postbuttons div.middletext
{
width: 60%;
}
#postbuttons span
{
display: block;
text-align: right;
}
#postbuttons span.lower
{
clear: right;
}
#postbuttons .buttonlist
{
float: right;
}
#postbuttons #pagelinks
{
padding-top: 1em;
}
#moderationbuttons
{
overflow: hidden;
}
/* Events */
.linked_events
{
padding: 1em 0;
}
.edit_event
{
margin: 0 1em;
vertical-align: middle;
}
/* Poll question */
#poll
{
overflow: hidden;
}
#poll .content
{
padding: 0 1em;
}
h4#pollquestion
{
padding: 0 0 0.5em 2em;
}

/* Poll vote options */
#poll_options ul.options
{
border-top: 1px solid #9999aa;
padding: 1em 2.5em 0 2em;
margin: 0 0 1em 0;
}
#poll_options div.submitbutton
{
border-bottom: 1px solid #9999aa;
clear: both;
padding: 0 0 1em 2em;
margin: 0 0 1em 0;
}

/* Poll results */
#poll_options dl.options
{
border: solid #9999aa;
border-width: 1px 0;
padding: 1em 2.5em 1em 2em;
margin: 0 1em 1em 0;
line-height: 1.1em !important;
}

#poll_options dl.options dt
{
padding: 0.3em 0;
width: 30%;
float: left;
margin: 0;
clear: left;
}

#poll_options dl.options .voted
{
font-weight: bold;
}

#poll_options dl.options dd
{
margin: 0 0 0 2em;
padding: 0.1em 0 0 0;
width: 60%;
max-width: 450px;
float: left;
}

#poll_options dl.options .percentage
{
display: block;
float: right;
padding: 0.2em 0 0.3em 0;
}

/* Poll notices */
#poll_options p
{
margin: 0 1.5em 0.2em 1.5em;
padding: 0 0.5em 0.5em 0.5em;
}

div#pollmoderation
{
margin: 0;
padding: 0;
overflow: auto;
}

/* onto the posts */
#forumposts
{
clear: both;
}
#forumposts .cat_bar
{
margin: 0 0 2px 0;
}
/* author and topic information */
#forumposts h3 span#author
{
margin: 0 7.7em 0 0;
}
#forumposts h3 img
{
float: left;
margin: 4px 0.5em 0 0;
}
#forumposts h3.catbg
{
margin-bottom: 3px;
}
p#whoisviewing
{
margin: 0;
padding: 0.5em;
}
/* poster and postarea + moderation area underneath */
.post_wrapper
{
float:left;
width:100%;
}
.poster
{
float: left;
width: 15em;
}
.postarea, .moderatorbar
{
margin: 0 0 0 16em;
}
.postarea div.flow_hidden
{
width: 100%;
}

.moderatorbar
{
clear: right;
}
/* poster details and list of items */
.poster h4, .poster ul
{
padding: 0;
margin: 0 1em 0 1.5em;
}
.poster h4
{
margin: 0.2em 0 0.4em 1.1em;
font-size: 120%;
}
.poster h4, .poster h4 a
{
color: #222;
}
.poster ul ul
{
margin: 0.3em 1em 0 0;
padding: 0;
}
.poster ul ul li
{
display: inline;
}
.poster li.stars, .poster li.avatar, .poster li.blurb, li.postcount, li.im_icons ul
{
margin-top: 0.5em;
}
.poster li.avatar
{
overflow: hidden;
}
.poster li.warning
{
line-height: 1.2em;
padding-top: 1em;
}
.poster li.warning a img
{
vertical-align: bottom;
padding: 0 0.2em;
}
.messageicon
{
float: left;
margin: 0 0.5em 0 0;
}
.messageicon img
{
padding: 6px 3px;
}
.keyinfo
{
float: left;
width: 50%;
}
.modifybutton
{
clear: right;
float: right;
margin: 6px 20px 10px 0;
text-align: right;
font: bold 0.85em arial, sans-serif;
color: #334466;
}

/* The quick buttons */
div.quickbuttons_wrap
{
padding: 0.2em 0;
width: 100%;
float: left;
}

ul.quickbuttons
{
margin: 0.9em 11px 0 0;
clear: right;
float: right;
text-align: right;
font: bold 0.85em arial, sans-serif;
}
ul.quickbuttons li
{
float: left;
display: inline;
margin: 0 0 0 11px;
}
ul.quickbuttons li a
{
padding: 0 0 0 20px;
display: block;
height: 20px;
line-height: 18px;
float: left;
}
ul.quickbuttons a:hover
{
color: #c4451d;
}
ul.quickbuttons li.quote_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 0;
}
ul.quickbuttons li.remove_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -30px;
}
ul.quickbuttons li.modify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -60px;
}
ul.quickbuttons li.approve_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -90px;
}
ul.quickbuttons li.restore_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -120px;
}
ul.quickbuttons li.split_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -150px;
}
ul.quickbuttons li.reply_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
}
ul.quickbuttons li.reply_all_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -180px;
}
ul.quickbuttons li.notify_button
{
background: url(../images/theme/quickbuttons.png) no-repeat 0 -210px;
}
ul.quickbuttons li.inline_mod_check
{
margin: 0 0 0 5px;
}

.post
{
margin-top: 0.5em;
clear: right;
}
.inner
{
padding: 1em 1em 2px 0;
margin: 0 1em 0 0;
border-top: 1px solid #99a;
}
.inner img.smiley
{
vertical-align: bottom;
}
#forumposts .modified
{
float: left;
}
#forumposts .reportlinks
{
margin-right: 1.5em;
text-align: right;
clear: right;
}
#forumposts .signature, .post .signature
{
margin: 1em 0 0 0;
}
#forumposts span.botslice
{
clear: both;
}
.attachments hr
{
clear: both;
margin: 1em 0 1em 0;
}
.attachments
{
padding: 1em 0 2em 0;
}
.attachments div
{
padding: 0 0.5em;
}

/* Styles for the quick reply area.


TheListener


Yigal

Yeah.  The codes I used when producing this mod are all from the default template.

Good luck:]
Yigal V.
Contact me by PM


do yourself a favour and not annoy support helpers by spamming or messaging for support
1.x Support | 2.x Support | 5Mods



Advertisement: