MyBB Community Forums

Full Version: need some css help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2011-08-09, 05:44 AM)Shemo Wrote: [ -> ]
(2011-08-09, 05:42 AM)Jason L. Wrote: [ -> ]Try this one:

<div id="container">
        <a name="top" id="top"></a>
        <div id="header">
            <div class="logo"><center><a href="{$mybb->settings['bburl']}/"><img src="{$theme['logo']}" style="margin: auto auto;" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></center></div>
            <div class="menu">
                <ul>
                    <li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
                </ul>
            </div>
            <hr class="hidden" />
            <div id="panel">
                {$welcomeblock}
            </div>
        </div>
        <hr class="hidden" />
        <br class="clear" />
        <div id="content">
            {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            {$pending_joinrequests}
            <navigation>
            <br />

perfect, thanks. what did you change in the above code that was wrong in the other code? just a mental note for future reference..

I added the <center> tag. Yes I know it is deprecated but it did the job you wanted so you cant complain.
where exactly is the "logo" css? I'm not finding it in the global.css file anywhere. if I can find it, I could probably write the css in there to make the margins adjust without using old tags.
^ which forum you are referring ? the forum in your signature consists of different themes
& you are referring to default theme AND the site at your profile is not loading at present ...
(2011-08-09, 06:10 AM)ranjani Wrote: [ -> ]^ which forum you are referring ? the forum in your signature consists of different themes
& you are referring to default theme AND the site at your profile is not loading at present ...

the site is damnfineshave.com

and yeah, the host went down for a few minutes; it should be back up now.

I'd prefer to use proper code if possible.
.logo {margin:auto auto;}

Didn't even think about that.
(2011-08-09, 06:23 AM)Jason L. Wrote: [ -> ].logo {margin:auto auto;}

Didn't even think about that.

just tried that and it didn't work. hmn.
(2011-08-09, 06:26 AM)Shemo Wrote: [ -> ]
(2011-08-09, 06:23 AM)Jason L. Wrote: [ -> ].logo {margin:auto auto;}

Didn't even think about that.

just tried that and it didn't work. hmn.

Try this:

<div id="container">
        <a name="top" id="top"></a>
        <div id="header">
        
            <div class="logo">
            	<div>
            		<a href="{$mybb->settings['bburl']}/">
            			<img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" />
            		</a>
            	</div>
            </div>
            
            <div class="menu">
                <ul>
                    <li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
                </ul>
            </div>
            <hr class="hidden" />
            <div id="panel">
                {$welcomeblock}
            </div>
        </div>
        <hr class="hidden" />
        <br class="clear" />
        <div id="content">
            {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            {$pending_joinrequests}
            <navigation>
            <br />

Then add to CSS:

.logo div {
margin: auto auto;
}
you have to hard refresh your forum page (may be 3 - 6 times) to get css changes reflect on your browser !!
(2011-08-09, 06:32 AM)ranjani Wrote: [ -> ]you have to hard refresh your forum page (may be 3 - 6 times) to get css changes reflect on your browser !!

No you don't..
(2011-08-09, 06:29 AM)Jason L. Wrote: [ -> ]
(2011-08-09, 06:26 AM)Shemo Wrote: [ -> ]
(2011-08-09, 06:23 AM)Jason L. Wrote: [ -> ].logo {margin:auto auto;}

Didn't even think about that.

just tried that and it didn't work. hmn.

Try this:

<div id="container">
        <a name="top" id="top"></a>
        <div id="header">
        
            <div class="logo">
            	<div>
            		<a href="{$mybb->settings['bburl']}/">
            			<img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" />
            		</a>
            	</div>
            </div>
            
            <div class="menu">
                <ul>
                    <li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
                    <li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
                </ul>
            </div>
            <hr class="hidden" />
            <div id="panel">
                {$welcomeblock}
            </div>
        </div>
        <hr class="hidden" />
        <br class="clear" />
        <div id="content">
            {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            {$pending_joinrequests}
            <navigation>
            <br />

Then add to CSS:

.logo div {
margin: auto auto;
}

nope, no go.
Pages: 1 2 3