I've been struggling to keep this box fixed at the top of the browser, but I'm facing an issue with the positioning on the right side. I can't seem to figure out how to solve it, so I'm reaching out for some help.
#StickyBar #RightSideOfStickyBar
{
float: right;
}
The intention is for this element to float all the way to the far-right side within the #BoxAlpha container. However, it's currently extending all the way to the edge of the browser instead.
Additionally, I am using a CSS reset from HTML5 doctor.
Below is the HTML5 code:
<div id="BoxAlpha">
<section id="StickyBar">
<section id="LeftSideOfStickyBar">
<ul class="Home">
<li class="HomeList">
<a href="#">Home</a>
</li>
</ul>
</section>
<section id="RightSideOfStickyBar">
<ul class="SignUpAndSignIn">
<li class="SignUpAndSignInList">
<a href="#">Sign Up</a>
</li>
<li class="SignUpAndSignInList">
<a href="#">Sign In</a>
</li>
</ul>
</section>
</section>
</div>
And here is the associated CSS:
#BoxAlpha
{
width: 1000px; height: auto; margin-left: auto; margin-right: auto;
}
#StickyBar
{
background-color: #EBEBEB; font-family: "Comic Sans MS", cursive, sans-serif; font-size: 1em; width: 100%; height: auto;
line-height: 50px; background: linear-gradient(#00FFFF, #4D70DB); border-style: solid; border-color: #999999;
position: fixed; top: 0; z-index: 1;
}
#StickyBar #LeftSideOfStickyBar
{
float: left;
}
#StickyBar #LeftSideOfStickyBar .Home
{
list-style: none;
}
#StickyBar #LeftSideOfStickyBar .Home .HomeList
{
float: left; width: 7em; text-align: center;
}
#StickyBar #LeftSideOfStickyBar .Home .HomeList > a
{
font-weight: 550; text-decoration: none; color: #000000; cursor: default;
}
#StickyBar #RightSideOfStickyBar
{
float: right;
}
#StickyBar #RightSideOfStickyBar .SignUpAndSignIn
{
list-style: none;
}
#StickyBar #RightSideOfStickyBar .SignUpAndSignIn .SignUpAndSignInList
{
float: left; width: 7em; text-align: center;
}
#StickyBar #RightSideOfStickyBar .SignUpAndSignIn .SignUpAndSignInList > a
{
font-weight: 550; text-decoration: none; color: #000000; cursor: default;
}