Reputation:
My site is displaying differently in Chrome to other browsers. I have checked in IE, Firefox, Safari and Chrome. All are ok apart from Chrome.
Looking at the CSS im not sure what the problem is.
Its 3 equal sized boxes in a line next to each other. the left and middle box are aligned but the right box is 20px higher up in Chrome.
Here is the CSS for the boxes:
#home_boxes {
margin: 20px 0 0 0;
clear: both;
width: 1000px;
overflow: hidden;
}
#home_boxes p {
margin-top: 0;
font-size: 10pt;
}
#home_boxes h2 {
margin-top: 0;
margin-bottom: 5px;
font-size: 14pt;
font-family: Verdana, Arial, Geneva, sans-serif;
}
#home_boxes .box_content {
width: 220px;
float: right;
padding: 5px;
}
#contact_box {
width: 318px;
min-height: 150px;
height: 100%;
background: url('../images/3box/contact.png') no-repeat #efefef;
float: left;
margin-right: 20px;
border: 1px solid #c9c9c9;
}
#contact_box:hover {
background: url('../images/3box/contact-hover.png') no-repeat #00529f;
border: 1px solid #c9c9c9;
color: #fff;
}
#about_box {
width: 318px;
min-height: 150px;
height: 100%;
background: url('../images/3box/about.png') no-repeat #efefef;
float: right;
margin-right: 20px;
border: 1px solid #c9c9c9;
}
#about_box:hover {
background: url('../images/3box/about-hover.png') no-repeat #00529f;
border: 1px solid #c9c9c9;
color: #fff;
}
#home_boxes #side_newsletter_box {
width: 320px;
background: url('../images/3box/newsletter.png') no-repeat;
overflow: hidden;
float: right;
}
#newsletter_box {
width: 318px;
min-height: 150px;
height: 100%;
background: url('../images/3box/newsletter.png') no-repeat #efefef;
float: right;
border: 1px solid #c9c9c9;
}
#newsletter_box:hover {
background: url('../images/3box/newsletter-hover.png') no-repeat #00529f;
border: 1px solid #c9c9c9;
color: #fff;
}
and here is the HTML:
<div id = "home_boxes">
<div id="newsletter_box">
<div class = "box_content">
<h2><?=get_content(610)?></h2>
<p><?=get_content(3234)?></p>
<form action = <?=$myroot?>"newsletter_process.php" method = "post">
<input type = "text" name = "email" class = "news_signup_input" value = <?=get_content(27)?> onClick = "this.value=''" />
<input type = "submit" name = "newsletter_submit" value = "" class = "news_signup_submit" />
</form>
</div>
</div>
<a href = "contact">
<div id = "contact_box">
<div class = "box_content">
<h2><?=get_content(1641)?></h2>
<p><?=get_content(3257)?></p>
</div>
</div>
</a>
<a href = "about">
<div id = "about_box">
<div class = "box_content">
<h2><?=get_content(3236)?></h2>
<p><?=get_content(3749)?></p>
</div>
</div>
</a>
</div>
Can someone see a problem. As im not sure of what the problem is i've been messing around with the CSS for a while but to no avail. I did not create this code, i've taken it on from someone else.
Upvotes: 2
Views: 2482
Reputation:
As far as im aware its simple, Place a clear
beneath the 3 box divs (newsletter_bos
, contact_box
, about_box
) but within the main
(home_boxes
) div.
something like this
.clear {
clear: both;
line-height: 0%;
height: 0px;
display: block;
}
This should solve your problem and align all boxes correctly.
Upvotes: 2