css style for display inline - html

I want to display a <h1> tag and button tag in same line, but the button appear slightly below. I marked In green where I want to display it:
h1{
display:inline-block;
}
.log {
width:60%;
height: 30%;
position: absolute;
border: 1px solid #f9f2f2;
border-radius: 10px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 0px solid #f9f2f2;
text-align: center;
line-height:20px;
border-width: 0px 0px 1px 1px;
}
<div class="log">
<h1>Profile</h1>
<form method="post">
<button class="logout" name="logout" >Logout</button>
</form>
</div>

I have just modified this:
form {
float: right;
display: inline-block;
margin-top: 20px;
}
h1 {
display: inline-block;
}
.log {
width: 60%;
height: 30%;
position: absolute;
border: 1px solid #f9f2f2;
border-radius: 10px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 0px solid #f9f2f2;
text-align: center;
line-height: 20px;
border-width: 0px 0px 1px 1px;
}
form {
float: right;
display: inline-block;
margin-top: 20px;
}
<div class="log">
<h1>Profile</h1>
<form method="post">
<button class="logout" name="logout">Logout</button>
</form>
</div>
<!--End of log div -->
or you can do it with:
form{
display:inline;
}

You have an inline for the <h1> tag, and now you can put the inline in your form tag as below:
<form method="post" style="display:inline">
<button class="logout" name="logout" >Logout</button>
</form>

h1{
display:inline-block;
}
.log {
width:60%;
height: 30%;
position: absolute;
border: 1px solid #f9f2f2;
border-radius: 10px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 0px solid #f9f2f2;
text-align: center;
line-height:20px;
border-width: 0px 0px 1px 1px;
}
form{
display:inline-block;
float:right;
margin-top:20px;
}
<div class="log">
<h1>Profile</h1>
<form method="post">
<button class="logout" name="logout" >Logout</button>
</form>
</div>

Related

How do I align and space out these buttons?

I want my buttons to be equally spaced out within that box. I tried using the align left. center, right but it's not actually moving anywhere. If I give it a padding, it won't look well on mobile.
body {
background-color: #9FDFF0;
}
#mine {
width: 550px;
margin: auto auto auto auto;
padding: 10px 10px;
background-color: white;
min-height: 100px;
border: 2px solid #73c0d8;
border-radius: 6px;
height: auto;
max-width: 100%;
}
img {
max-width: 100%;
height: auto;
width: auto\9;
/* ie8 */
}
p {
font-size: 30px;
}
.OrangeBtn {
-moz-box-shadow: inset 0px 1px 0px 0px #f9eca0;
-webkit-box-shadow: inset 0px 1px 0px 0px #f9eca0;
box-shadow: inset 0px 1px 0px 0px #f9eca0;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f0c911), color-stop(1, #f2ab1e));
background: -moz-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -webkit-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -o-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -ms-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: linear-gradient(to bottom, #f0c911 5%, #f2ab1e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f0c911', endColorstr='#f2ab1e', GradientType=0);
background-color: #f0c911;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
border: 1px solid #e65f44;
display: inline-block;
cursor: pointer;
color: #c92200;
font-family: Verdana;
font-size: 15px;
font-weight: bold;
padding: 6px 24px;
text-decoration: none;
text-shadow: 0px 1px 0px #ded17c;
}
.OrangeBtn:hover {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f2ab1e), color-stop(1, #f0c911));
background: -moz-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -webkit-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -o-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -ms-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: linear-gradient(to bottom, #f2ab1e 5%, #f0c911 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2ab1e', endColorstr='#f0c911', GradientType=0);
background-color: #f2ab1e;
}
.OrangeBtn:active {
position: relative;
top: 1px;
}
<body>
<div id="mine">
<h1>
<center>Logo Goes Here</center>
</h1>
<a class="OrangeBtn" href="#">My Button 1</a>
<a class="OrangeBtn" href="#">My Button 2</a>
<a class="OrangeBtn" href="#">My Button 3</a>
<hr>
<p>
The server is online
</p>
</div>
</body>
Use flexbox with justify-content: space-evenly;:
.button-container {
display: flex;
/*Next line does the magic*/
justify-content: space-evenly;
}
body {
background-color: #9FDFF0;
}
#mine {
width: 550px;
margin: auto auto auto auto;
padding: 10px 10px;
background-color: white;
min-height: 100px;
border: 2px solid #73c0d8;
border-radius: 6px;
height: auto;
max-width: 100%;
}
img {
max-width: 100%;
height: auto;
width: auto\9;
/* ie8 */
}
p {
font-size: 30px;
}
.OrangeBtn {
-moz-box-shadow: inset 0px 1px 0px 0px #f9eca0;
-webkit-box-shadow: inset 0px 1px 0px 0px #f9eca0;
box-shadow: inset 0px 1px 0px 0px #f9eca0;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f0c911), color-stop(1, #f2ab1e));
background: -moz-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -webkit-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -o-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: -ms-linear-gradient(top, #f0c911 5%, #f2ab1e 100%);
background: linear-gradient(to bottom, #f0c911 5%, #f2ab1e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f0c911', endColorstr='#f2ab1e', GradientType=0);
background-color: #f0c911;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
border: 1px solid #e65f44;
display: inline-block;
cursor: pointer;
color: #c92200;
font-family: Verdana;
font-size: 15px;
font-weight: bold;
padding: 6px 24px;
text-decoration: none;
text-shadow: 0px 1px 0px #ded17c;
}
.OrangeBtn:hover {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f2ab1e), color-stop(1, #f0c911));
background: -moz-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -webkit-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -o-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: -ms-linear-gradient(top, #f2ab1e 5%, #f0c911 100%);
background: linear-gradient(to bottom, #f2ab1e 5%, #f0c911 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2ab1e', endColorstr='#f0c911', GradientType=0);
background-color: #f2ab1e;
}
.OrangeBtn:active {
position: relative;
top: 1px;
}
<div id="mine">
<h1>
<center>Logo Goes Here</center>
</h1>
<div class="button-container">
<a class="OrangeBtn" href="#">My Button 1</a>
<a class="OrangeBtn" href="#">My Button 2</a>
<a class="OrangeBtn" href="#">My Button 3</a>
</div>
<hr>
<p>
The server is online
</p>
</div>

HTML CSS - How to put button at the center of my page

How can I put my button at the center of my page?
My button is in a div. I wanted to change the background of the div and put everything at the center of the page, like a login page.
My code:
.serverPW{
font: 18px Arial;
font-color: black;
}
.serverPwClass {
-moz-box-shadow:inset 0px 1px 3px 0px #91b8b3;
-webkit-box-shadow:inset 0px 1px 3px 0px #91b8b3;
box-shadow:inset 0px 1px 3px 0px #91b8b3;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #44b395), color-stop(1, #6c7c7c));
background:-moz-linear-gradient(top, #44b395 5%, #6c7c7c 100%);
background:-webkit-linear-gradient(top, #44b395 5%, #6c7c7c 100%);
background:-o-linear-gradient(top, #44b395 5%, #6c7c7c 100%);
background:-ms-linear-gradient(top, #44b395 5%, #6c7c7c 100%);
background:linear-gradient(to bottom, #44b395 5%, #6c7c7c 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#44b395', endColorstr='#6c7c7c',GradientType=0);
background-color:#44b395;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
border:1px solid #566963;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding:11px 23px;
text-decoration:none;
text-shadow:0px -1px 0px #2b8a7c;
top: 50%;
left: 50%;
}
.serverPwClass:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #6c7c7c), color-stop(1, #44b395));
background:-moz-linear-gradient(top, #6c7c7c 5%, #44b395 100%);
background:-webkit-linear-gradient(top, #6c7c7c 5%, #44b395 100%);
background:-o-linear-gradient(top, #6c7c7c 5%, #44b395 100%);
background:-ms-linear-gradient(top, #6c7c7c 5%, #44b395 100%);
background:linear-gradient(to bottom, #6c7c7c 5%, #44b395 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c7c7c', endColorstr='#44b395',GradientType=0);
background-color:#6c7c7c;
}
.serverPwClass:active {
position:relative;
top:1px;
}
<div class="serverPW">
<label>Server password</label>
<form id ServerLogin>
<input id= "serverPassword" type="password" class= "serverPwClass" placeholder="Password">
</form>
</div>
JSFiddle
Simple way to do it:
.button {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
max-width: 400px;
}
This will horizontally and vertically align your button.
In the CSS put:
margin: 0 auto;
.center {
text-align: center;
}
<div class="center">
<button>click me!</button>
</div>
For future reference, please put JSFiddle in answer, but here you go:
.serverPW{
position: absolute;
height: 100%;
font: 18px Arial;
font-color: black;
text-align: center;
}
That should work.
Well... you could just use the 'center' tag in your HTML but then, it'd mess up the page, at least that's what happened in my experience.
Use the following code in CSS for the button.
.button{
position: absolute;
height: 100%;
font-size: 18px;
color: black;
text-align: center;
}

css style for div tag height

I am setting all my div tags' height in pixels. I am having some problems and I think that if I set height in % it will help me. % is working for width, but unfortunately I can't set my div height in %.
Here is my CSS where I want to replace pixel with % height.
.header{
width:100%;
height:100px;
background: rgb(226,226,226); /* Old browsers */
background: -moz-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(201,201,201,1) 37%, rgba(229,229,229,1) 65%, rgba(209,209,209,1) 78%, rgba(209,209,209,1) 78%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(226,226,226,1)), color-stop(37%,rgba(201,201,201,1)), color-stop(65%,rgba(229,229,229,1)), color-stop(78%,rgba(209,209,209,1)), color-stop(78%,rgba(209,209,209,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* IE10+ */
background: linear-gradient(to right, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#d1d1d1',GradientType=1 ); /* IE6-9 */
}
.logo{
margin: 0px 0;
padding: 15px 0px 0px 130px;
cursor: pointer;
float:left;
}
.heading{
float: left;
margin-top: 0px;
margin-left: 6px;
height: 50px;
width: 75%;
background-color: #D1D0CE;
text-align:center;
}
body{
margin:0;
padding:0;
width:100%;
font:normal 12px/1.5em "Liberation sans", Arial, Helvetica, sans-serif;
overflow-x: hidden;
background-image:url('image/silver.jpg');
background-repeat:no-repeat;
background-size:cover;
}
.footer{
width:100%;
height:50px;
background: rgb(226,226,226); /* Old browsers */
background: -moz-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(201,201,201,1) 37%, rgba(229,229,229,1) 65%, rgba(209,209,209,1) 78%, rgba(209,209,209,1) 78%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(226,226,226,1)), color-stop(37%,rgba(201,201,201,1)), color-stop(65%,rgba(229,229,229,1)), color-stop(78%,rgba(209,209,209,1)), color-stop(78%,rgba(209,209,209,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* IE10+ */
background: linear-gradient(to right, rgba(226,226,226,1) 0%,rgba(201,201,201,1) 37%,rgba(229,229,229,1) 65%,rgba(209,209,209,1) 78%,rgba(209,209,209,1) 78%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#d1d1d1',GradientType=1 ); /* IE6-9 */
}
h1{
display:inline-block;
}
.outer {
margin-left: 20%;
margin-top: 3%;
margin-bottom: 3%;
height: 737px;
width: 60%;
box-shadow: 10px 10px 5px #888888;
border: 1px solid #f9f2f2;
border-radius: 10px;
}
button.logout{
float:right;
margin-right:10px;
}
.log {
width:60%;
height: 10%;
position: absolute;
border: 1px solid #f9f2f2;
border-radius: 10px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 0px solid #f9f2f2;
text-align: center;
line-height:20px;
border-width: 0px 0px 1px 1px;
}
.rest {
height: 685px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
.sidemenu {
float: left;
margin-top: 150px;
width: 100%;
}
.content {
border-left: thick solid #f9f2f2;
}
.side{
width: 24%;
float: left;
display: inline-block;
}
hr {
margin: 0;
width: 1px;
height: 660px;
border: 0;
background: #fff;
float: left;
}
.astext {
background:none;
border:none;
margin:0;
padding:0;
cursor:pointer;
color:#000000;
line-height:35px;
font-family:arial;
font-size:13px;
font-weight:bold;
}
a.astext:link,a.astext:visited {
color:black;
background-color:transparent;
text-decoration:none;
}
a.astext:hover,a.astext:active {
color:black;
background-color:transparent;
text-decoration:none;
}
.menu{
height: 45px;
text-align:left;
margin-left:2px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
.menu:hover{
background: -o-linear-gradient(top, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center bottom, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(bottom, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
<body>
<div class="main">
<div class="header">
<img src="image/DZB.png" class="logo" style="width:110px;height:70px" alt="logo"/>
</div> <!--End of header div-->
<div class="outer">
<div class="log">
<h1>Profile</h1>
<form method="post"> <button class="logout" name="logout" >Logout</button></form>
</div> <!--End of log div -->
<div class="rest">
<div class="side">
<div class="sidemenu">
<div class="1 menu">
Profile
</div> <!--End of menu1 -->
<div class="2 menu">
Clients
</div> <!--End of menu 2-->
<div class="3 menu">
Employees
</div> <!--End of menu 3-->
<div class="menu 4">
Documents
</div> <!--End of menu 4-->
</div> <!--End of side menu -->
</div> <!--End of side div -->
<hr>
<!-- <div class="heading" >
<h1>Profile</h1>
</div> End of heading div -->
<div class="content">
</div> <!--End of content -->
</div> <!--End of rest div -->
</div> <!--End of outer div-->
<div class="footer">
</div>
</div> <!--End of main div-->
</body>
may be it's not possible by this way. if you fixed any div's height by %, you have to fixed it's parent div's height. below an example...
css--
.parent_div{
height:500px;
position:relative;
}
.chield_div{
height:50%;
position:relative;
}
Try this
.sidemenu
{
left: 0px;
margin-top: 150px;
position: absolute;
height: 25%;
width: 30%;
}
<div class="sidemenu">
<div class="1 menu">
Profile
</div>
<div class="2 menu">
Clients
</div>
<div class="3 menu">
Employees
</div>
<div class="menu 4">
Documents
</div>
</div>

how to add css for div tag

I want to display the div tag from top of 'rest' div tag.
'Rest' div tag is like container. I want to display the menu on left side and want to display the 'heading' div tag on the margin-top of the rest tag.
In my layout I drawn 'menu' div in green color which is correct.I want to display the div tag 'heading' on the position where I marked in red box.But my problem is now it is displayed in the botton which i drawn it in blue colored box.
.heading{
float:left;
margin-top:0px;
margin-left:170px;
height:25px;
width:79%;
background-color:#15317E;
}
.rest {
height: 685px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
.sidemenu {
float: left;
margin-top: 150px;
height: 250px;
width: 150px;
border: 1px solid #f9f2f2;
border-radius: 10px;
}
.content {
border-left: thick solid #f9f2f2;
}
hr {
margin: 0;
margin-left:170px;
width: 1px;
height: 660px;
border:0;
background: #fff;
}
.menu{
height: 45px;
width: 150px;
text-align:left;
margin-left:2px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
<div class="rest">
<div class="side">
<div class="sidemenu">
<div class="1 menu">
Profile
</div> <!--End of menu1 -->
<div class="2 menu">
Clients
</div> <!--End of menu 2-->
<div class="3 menu">
Employees
</div> <!--End of menu 3-->
<div class="menu 4">
Documents
</div> <!--End of menu 4-->
</div> <!--End of side menu -->
</div> <!--End of side div -->
<hr>
<div class="heading" >
</div> <!-- End of heading div -->
<div class="content">
</div> <!--End of content -->
</div> <!--End of rest div -->
Replace your .heading, hr and add new css .side class. I think that it will be solved.
.heading{
float: left;
margin-top: 0px;
margin-left: 0px;
height: 25px;
width: 66%;
background-color: #15317E;
}
.side{
width: 33%;
float: left;
display: inline-block;
}
hr {
margin: 0;
width: 1px;
height: 660px;
border: 0;
background: #fff;
float: left;
}
Demo
Try adding CSS class to .side and update .header
.heading{
float:left;
height:25px;
width:79%;
background-color:#15317E;
}
.rest {
height: 685px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
.sidemenu {
float: left;
margin-top: 150px;
height: 250px;
width: 150px;
border: 1px solid #f9f2f2;
border-radius: 10px;
}
.content {
border-left: thick solid #f9f2f2;
}
hr {
margin: 0;
margin-left:170px;
width: 1px;
height: 660px;
border:0;
background: #fff;
}
.menu{
height: 45px;
width: 150px;
text-align:left;
margin-left:2px;
background: -o-linear-gradient(bottom, #e5e3e3 5%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e5e3e3), color-stop(1, #ffffff));
background: -moz-linear-gradient(center top, #e5e3e3 5%, #ffffff 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#e5e3e3", endColorstr="#ffffff");
background: -o-linear-gradient(top, #e5e3e3, ffffff);
background-color: #e5e3e3;
border: 1px solid #f9f2f2;
border-width: 0px 0px 0px 0px;
border-radius: 0px 0px 10px 10px;
text-align: left;
padding: 0px 7px;
}
.side{
float:left; width:19%;
}
Add these two css properties to your ".heading" in your css part
.heading{
position:absolute;
top:0;
}

Navigation text interfering with regular?

I'm not sure what's going on here, but I'm trying to get it so the "Welcome to blabla" is on the right side of my thead. But it seems to glitch out?
screenshot: http://i.imgur.com/mCGCE8B.png
CSS Code:
body {
background-image: url('images/bg.png');
background-repeat: repeat;
padding: 0px;
margin: 0 0;
}
.content {
max-width: 1200px;
height: 800px;
margin: 0px auto;
background: #B9B9B9;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
box-shadow: 0px 5px 5px #000;
}
#navBack {
max-width: 1200px;
height: 30px;
background: rgb(30,87,153);
background: rgb(69,72,77);
background: rgb(246,248,249);
background: -moz-linear-gradient(top, rgba(246,248,249,1) 0%, rgba(229,235,238,1) 50%, rgba(215,222,227,1) 51%, rgba(245,247,249,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(246,248,249,1)), color-stop(50%,rgba(229,235,238,1)), color-stop(51%,rgba(215,222,227,1)), color-stop(100%,rgba(245,247,249,1)));
background: -webkit-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -o-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -ms-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: linear-gradient(to bottom, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f8f9', endColorstr='#f5f7f9',GradientType=0 );
margin: 0px auto;
border-bottom: solid #424242;
}
#navBack ul {
list-style-type: none;
height: 80px;
max-width: 1200px;
margin: auto;
}
#navBack li {
list-style-type: none;
height: 80px;
width: 100px;
margin: 0;
text-align: center;
float: left;
}
#navBack ul a {
background-image: url(images/nav_sep.png);
background-repeat: no-repeat;
background-position: right;
padding-right: 0px;
padding-left: 0px;
display: block;
line-height: 30px;
text-decoration: none;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
color: #000;
}
#navBack ul a:hover {
color: #fff;
}
.copyright {
max-width: 1200px;
height: 30px;
background: rgb(246,248,249);
background: -moz-linear-gradient(top, rgba(246,248,249,1) 0%, rgba(229,235,238,1) 50%, rgba(215,222,227,1) 51%, rgba(245,247,249,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(246,248,249,1)), color-stop(50%,rgba(229,235,238,1)), color-stop(51%,rgba(215,222,227,1)), color-stop(100%,rgba(245,247,249,1)));
background: -webkit-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -o-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -ms-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: linear-gradient(to bottom, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f8f9', endColorstr='#f5f7f9',GradientType=0 );
margin: 0px auto;
border-top: solid #424242;
text-align: center;
line-height: 30px;
box-shadow: 0px 3px 3px #000;
}
.copyright a {
color: green;
}
#theadTitle {
max-width: 1200px;
height: 30px;
background: rgb(246,248,249);
background: -moz-linear-gradient(top, rgba(246,248,249,1) 0%, rgba(229,235,238,1) 50%, rgba(215,222,227,1) 51%, rgba(245,247,249,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(246,248,249,1)), color-stop(50%,rgba(229,235,238,1)), color-stop(51%,rgba(215,222,227,1)), color-stop(100%,rgba(245,247,249,1)));
background: -webkit-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -o-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: -ms-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
background: linear-gradient(to bottom, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f8f9', endColorstr='#f5f7f9',GradientType=0 );
border-bottom: solid #424242;
}
#thead {
max-width: 1200px;
height: 400px;
background-color: #CBCBCB;
margin: 20px 20px;
box-shadow: 0px 0px 3px #000;
}
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Noszscape - Home</title>
<LINK href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="content">
<div id="navBack">
<ul>
<li>Home</li>
<li>Forums</li>
<li>Play Now</li>
<li>Download</li>
<li>Vote</li>
<li>Donate</li>
</ul>
</div>
<div id="thead" style="width: 75%">
<div id="theadTitle" > Welcome to Naszscape! </div>
</div>
</div>
<div class="copyright">
<span style="font-style:italic"><strong>All rights reserved ©</span> <span style="color: skyblue">317 Delta Coder</span> <span style="font-style:italic">2014</strong></span>
</div>
</body>
</html>
You have an inline style of width: 75% which is pushing the text off the side.
I would remove that and the max-width: 1200px; and add text-align: right; to the #theadTitle element.
See this fiddle.