Jump to content

Works properly in ie, but not in firefox??


Xyphon

Recommended Posts

I'm not sure if this is an html or css problem, so I decided just to put it in html. Anyway, here is the problem.

I have 3 divs inside a table. The problem is, in firefox, the third div goes around the table or at the edge of the table around the other divs (not quite sure), instead of beside the second div like it should. In IE it goes beside the second div like expected.

 

Here is the html:

<html>
<head>
<link rel='stylesheet' type='text/css' href='Style.css'>

</head>
<body>
<table border='0' align='center' height='100%'><td width='750' height='100%'>
<div id='banner'><font color='red'>Banner Here</font></div> <br />
<div id='leftmenu'><a href='Signup.php'><img style='border: none;' src='signup.png'></a></div>
<div id='Content'>....
</div></td></table>
</body>
</html>

 

 

Here is the css so far (Content is the one thats wrapping around)

body {
background-color: #000000;
color:white;
text-align: center;
}
#Banner {
border-style: solid;
border-width: 1px;
border-color:red;
width:750px;
height:150px;
float:left;
}
#leftmenu {
background-color: #990000;
border-style: solid;
border-color: #990000;
border-width: 1px;
margin-right:5px;
margin-bottom:100px;
margin-top:5px;
width:200px;
height:100%;
float:left;
text-align:center;
}
#Content {
width:500px;
height:100%
float:left;
text-align: center;
}

Any ideas?

Link to comment
Share on other sites

First, you need to understand the box model, this is how the full width is determined by the width, borders, padding.  This can be rendered different from browser to browser.  Second, why are you wrapping your code in a table?  Third, I'd suggest learning some CSS shorthand, you are writing too much code.

Link to comment
Share on other sites

<html>
<head>
<style>
body {
background-color: #000000;
color: #ffffff;
}
#box {position: relative;  width: 750px;  height: 100%;  margin-left: auto; margin-right: auto; }
#box h1 { color: #ff0000; text-align: center; }
#box img { border: 0px; }
#box .Banner {
border-style: solid;
border-width: 1px;
border-color:red;
width:750px;
height:150px;
float:left;
}
#box .leftmenu {
background-color: #990000;
border-style: solid;
border-color: #990000;
border-width: 1px;
margin-right:5px;
margin-bottom:100px;
margin-top:5px;
width:200px;
height:100%;
float:left;
}
#box .Content {
width:500px;
height:100%;
text-align: center;
float:left;
}
</style>
</head>
<body>
<div id="box">
<div class='banner'><h1>Banner Here<h1></div> <br />
<div class='leftmenu'><a href='Signup.php'><img src='signup.png' /></a></div>
<div class='Content'>....</div>
</div>
</body>
</html>

 

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.