Jump to content

Alignment Problems


BillyBoB

Recommended Posts

I have a div inside a div that should align somehow to the top corner. In Firefox/IE which are the main browsers the div is automatically aligned to the bottom. In Opera/Safari the div is automatically aligned to center. I have the problem of aligning both to top. When I add a simple top: -29px it works for Firefox/IE but then it is too far for Safari/Opera. I really would like them to work for all browsers.

 

The css is:

#ChatTabs {
width: 100%;
height: 39px;
text-align: left;
}

.ChatTab {
width: 96px;
height: 28px;
background: url('../images/ChatTab.jpg') no-repeat;
padding: 11px 0px 0px 21px;
margin-right: 4px;
float: left;
}

.ChatClose {
display: inline;
width: 5px;
height: 5px;
padding-right: 2px;
float: right;
}

.CloseBtn {
background: url('../images/icons/CloseUp.jpg') no-repeat;
}

.CloseBtn:hover {
background: url('../images/icons/CloseDown.jpg') no-repeat;
}

 

The html is:

<div id="ChatTabs">
<div class="ChatTab">Main Channel</div>
<div class="ChatTab">alyis<div class="ChatClose"><a href="#"><img src="../images/spacer.gif" alt="Close" style="width: 5px;" class="CloseBtn"></img></a></div></div>
<div class="ChatTab">fluidman<div class="ChatClose"><a href="#"><img src="../images/spacer.gif" alt="Close" style="width: 5px;" class="CloseBtn"></img></a></div></div>
</div>

 

If you would like to see a live demo then go to http://syckgamingleague.com/ and sign-in username: Test. Password: test123. Then click chat at top.

Link to comment
Share on other sites

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.