Jump to content

Recommended Posts

Hi

 

I have coded my page so it has a header, and then two 'container' divs side by side. This works fine on a larger screen res, but as soon as the res is lowered, the right div moves underneath the left div.

 

What am i doin wrong

 

Code below

 

body
{
font-family:Arial, Helvetica, sans-serif;
font-size:12px; background-color:#333; 
}
#container
{
width:350px;
float:left;
}

#tabbox
{
height:40px
}
#panel
{
background-color:#FFF;
height:300px;

}
.tab
{
background: #dedede;
display: block;
height: 40px;
line-height: 40px;
text-align: center;
width: 80px;
float: right;
font-weight: bold;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-moz-border-radius: 4px 4px 0px 0px;
}
a
{
color: #000;
margin: 0;
padding: 0;
text-decoration: none;
}
.signup
{
margin-left:8px;

}
.select
{
background-color:#FFF;

}
#loginbox
{
height:300px;
padding:10px;
}
#signupbox
{
height:300px;
padding:10px;
display:none;
}
#textcontainer
{
float:right;
width:500px;
color:white;
margin-left:50px;
margin-right:50px;
}
.h1
{
font-size:16px;
text-align:center;
padding:10px;
}
.h2
{
font-size:12px;
text-align:center;
padding:10px;
}
<body>
<div id="header">

  <div align="center"><img src="Images/Banner1.gif" width="252" height="140" alt="pwnedbokv4!" />
  
  </div>
</div>
<div style="margin:40px">
<div id="container">
<div id="tabbox">
<a href="#" id="signup" class="tab signup">Signup</a>
<a href="#" id="login" class="tab select">Login</a>
</div>
<div id="panel">
<div id="loginbox"><h1>Login</h1>
<form>
</form>
</div>
<div id="signupbox"><h1>Signup</h1>
<form>
</form>
</div>
</div>

</div>
<div id="textcontainer">
<div class="h1"></div>
<div class="h2"></div>
</div>
</div>
</body>

 

#container and #textcontainer are the two divs in question

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.