like2program
New Member
- Messages
- 244
- Reaction score
- 0
- Points
- 0
Side bar HTML:
CSS:
And my website is like2program.x10hosting.com
Now here's my problem, I want to move the sidebar down just an inch or so, but when I attempt it, the space between the top and the sidebar gets filled with the background color.
Is there any way to make it not fill in?
Ya I know this is confusing and very easy to fix, but I haven't a clue how to do so.
Could anyone please tell me how to fix my dilemma so I can get around to the rest of the site?
Edit:
Does anyone actually read this section? -(posted 2 hours later)
PHP:
<div class="sidebar1">
<div class='roundbox'>
<div class='roundboxtop'><div></div></div>
<div class='roundboxcontent'>
<script src="http://like2program.x10hosting.com/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="http://like2program.x10hosting.com/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="http://like2program.x10hosting.com/">Main Page</a></li>
<li><a class="MenuBarItemSubmenu" href="http://like2program.x10hosting.com/News">News</a>
<ul>
<li><a href="http://like2program.x10hosting.com/News">News Page</a></li>
<li><a href="http://like2program.x10hosting.com/News/FPS/">FPS Paintball</a></li>
</ul>
<li><a class="MenuBarItemSubmenu" href="http://like2program.x10hosting.com/games">Games</a>
<ul>
<li><a href="http://like2program.x10hosting.com/games">Game Page</a></li>
<li><a href="http://like2program.x10hosting.com/games/ShadowFactory">Shadow Factory</a></li>
<li><a href="http://like2program.x10hosting.com/games/BBuzz">Backyard Buzzing</a></li>
</ul>
</li>
</li>
</ul>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"/SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</div>
</div>
<div class='roundboxbottom'><div></div></div>
</div>
CSS:
HTML:
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background-image: url(http://like2program.x10hosting.com/Pictures/background666666.png);
background-repeat: repeat-x;
background-color: #666666 ;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
.thrColLiqHdr #container {
width: 90%; /* this will create a container 80% of the browser width --EDIT: 90% */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
margin-top: 2%;
margin-bottom: 2%;
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.header {
background: #EBEBEB;
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
/* Tips for sidebars:
1. Since we are working in percentages, it's best not to use side padding on the sidebars. It will be added to the width for standards compliant browsers creating an unknown actual width.
2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the '.thrColLiqHdr #sidebar1 p' rule.
3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
*/
.sidebar1 {
float:left; /* this element must precede in the source order any element you would like it be positioned next to */
width: 22%; /* since this element is floated, a width must be given */
background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
/*padding: 1px 0; /*top and bottom padding create visual space within this div */
}
/*
--HIDDEN--
I hid this because I don't have any use for a right sidebar yet...
I will reenable when I want to do something with it...
Right_Navbar.php doesn't contain anything ATM
.sidebar2 {
float: right; /* this element must precede in the source order any element you would like it be positioned next to */
width: 23%; /* since this element is floated, a width must be given */
background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 1px 0; /* top and bottom padding create visual space within this div */
*/
/**********************************************
This is the code to make "fancy" rounded boxes
**********************************************/
.roundbox {
background: #EBEBEB;
}
.roundboxtop {
background: url(http://like2program.x10hosting.com/Pictures/RoundedSquare/ne.gif) no-repeat top right;
}
.roundboxtop div {
font-size: 0;
height: 30px;
background: url(http://like2program.x10hosting.com/Pictures/RoundedSquare/nw.gif) no-repeat top left;
}
.roundboxbottom {
background: url(http://like2program.x10hosting.com/Pictures/RoundedSquare/se.gif) no-repeat bottom right;
}
.roundboxbottom div {
font-size: 0;
height: 30px;
background: url(http://like2program.x10hosting.com/Pictures/RoundedSquare/sw.gif) no-repeat bottom left;
}
.roundboxcontent {
padding: 0px 30px 0px 30px;
}
.thrColLiqHdr #sidebar1 p, .thrColLiqHdr #sidebar1 h3, .thrColLiqHdr #sidebar2 p, .thrColLiqHdr #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 10px;
}
/* Tips for mainContent:
1. the space between the mainContent and sidebars is created with the left and right margins on the mainContent div.
2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 300px or smaller (this includes images).
3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent 'hasLayout.' This avoids several IE-specific bugs.
*/
.thrColLiqHdr #mainContent {
margin: 0 5% 0 23.5%; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
float:none;
vertical-align:top
}
.thrColLiqHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#DDDDDD;
}
.thrColLiqHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain its child floats */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
</style>
And my website is like2program.x10hosting.com
Now here's my problem, I want to move the sidebar down just an inch or so, but when I attempt it, the space between the top and the sidebar gets filled with the background color.
Is there any way to make it not fill in?
Ya I know this is confusing and very easy to fix, but I haven't a clue how to do so.
Could anyone please tell me how to fix my dilemma so I can get around to the rest of the site?
Edit:
Does anyone actually read this section? -(posted 2 hours later)
Last edited: