MyBB Community Forums

Full Version: Sidebar problem with CSS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I'm trying to fix this:
[Image: attachment.php?aid=26814]
[attachment=26814]
Here's code situation:
At very end of header I open with a div class of:
	float: left;
	margin-right: -328px;
	width:100%;
and I close that div at the very beginning of footer.
After my close div at very beginning of footer I use div class for
my sidebar as:
	float: right;
	width:308px;
	display:block;
	padding:0;
	margin:0;
        margin-left: 0%;

I'm simply trying to keep width at a 100% from end of header to beginning of footer minus 328 pixels to the right to fit the side bar.

What do you guys think? thank you.
Will this work?
right:328px;
Right:328px on sidebar just adds 328px on the right side outside of the forum container. So no it didn't.. I've done this before but can't remember the site I read the article on. Float is funky, and overflow doesn't always help in the right way.

Edit:
I've gotten a lot closer with this:
.forumblock{
	margin-right:328px;
}

.forumoutline {
	float: left;
	margin-right: -328px;
	width:100%;
}

.sidebar {
        float:right;
        width: 308px;
	display:block;
        padding: 0;
	margin:0;
	margin-left: 0%;
}


But the sidebar is not sliding UP into place.

Bottom of header:
<div class="forumblock"
<div class="forumoutline">
Top of footer:
</div><!--End Forum Outline -->
</div><!--End ForumBlock -->
<div class="sidebar">

Almost there....
if you post a url we may be able to help better.
[Image: pGltN.png]

also this is in the wrong section

Also you signature is saying to be fraudulent as give false information = fraud
... what are you talking about?... my sig is about online account security and it's good advice. Misleading online information about your real identity slows down social engineering attempts.
And why are you tying to mini-mod me?
Also I don't see how posting a url would help much as I've already given all the CSS involved, this is not a php or plugin issue. Just basic CSS which is not cooperating for me at the moment.
desired layout is as such:
hhhhhhhh
cccccc ss
fffffffffffff

but it more or less looks like this right now
hhhhhhhh
cccccc
-------ss
fffffffffffff

I might need to add another wrap to make the sidebar go up into place. not sure yet. Been trying every combination of position,left,right,margin,display,float that I can find or think of.
Still trying to figure this out, even when wrapping side bar and forum block below header and above footer in a div ID and floating side bar right and floating forum block left. still no bueno.
It decides to place the sidebar on the right just fine, but below the forum block div:
[attachment=26824]

even if I margin right the forum block to make space for the sidebar.. the sidebar will always stay below the forum block instead of beside it... any ideas why?

Added CSS from default is this:
#displayall {
	width: 92%;
	margin:auto;
	text-align: left; /* IE 5 fix */
        min-width: 1056px;
        max-width: 1880px;
	position:relative;
}

#forumcontainer{
        padding:0;
        margin:0;
}

#forumblock{
        float:left;
        min-width: 728px;
        max-width: 1552px;
        margin:0;
}

#sidebar {
        position: relative;
        float:right;
        width: 308px;
        height: 100%
	display:block;
        padding: 0;
        margin:0;
}
Appended CSS from default is this:

#header {
	width: 92%;
	margin:auto;
	padding: 12px;
	text-align: center;
	position:relative;
}

#container {
	width: 92%;
	background: #fff;
	border-radius:3px;
	color: #000000;
	margin:auto;
	padding: 12px;
	text-align: left; /* IE 5 fix */
	position:relative;
}

#content {
	/* FIX: Make internet explorer wrap correctly */
	width: auto !important;
}

Appended Header template is this:
<div id="displayall">
<a name="top" id="top"></a>
<div id="header">
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
</div><!-- End header -->
<div id="container">
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}{$mysupport_tech_notice}{$mysupport_assign_notice}
{$pending_joinrequests}
<navigation>
<br />
..........................below are appended to last 2 lines of template
<div id="forumcontainer"><!-- For wrapping forumblock and sidebar -->
<div id="forumblock"><!-- Making Space for Sidebar -->

and footer template appended as such at begining:
</div><!--End ForumBlock -->
<div id="sidebar">

<!--Box 1 -->
 <div class="tborder">
  <div class="thead">
  </div>
  <div class="trow1 cell-padding" align="center">
   <div align="center">script goes here
   </div>
  </div>
 </div>
<br />

<!--Box 2 -->
 <div class="tborder">
  <div class="thead">
  </div>
  <div class="trow1 cell-padding" align="center">
   <div align="center">script goes here
   </div>
  </div>
 </div>

<br />

<!--Box 3 -->

 <div class="tborder">
  <div class="thead">
  </div>
  <div class="trow1 cell-padding" align="center">
   <div align="center">script goes here
   </div>
  </div>
 </div>

</div><!--End sidebar -->
</div><!--End forumcontainer -->