View Full Version : Navbar div background, Chrome, resize, gap

07-18-2011, 10:44 AM
Dear all, a quick question - there is something wrong with Chrome, because when I try to resize window (zoom), it creates a gap between the main navbar and the right div (with rounded edges). IE and Firefox work perfectly.

Does anyone know why this happens and how to help? Thanks. Here is the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta name="description" content="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body, html
{margin: 4px 0px 0px 0px;
padding: 0px;}
{position: absolute;
width: 8px;
height: 36px;
float: left;
background: url('http://www.shrani.si/f/q/l4/VaHWUz1/navld.png');}
{margin: 0 auto;
width: 800px;
height: 36px;
text-indent: 6px;}
#navbar .inbar
{margin-left: 8px;
display: block;
height: 36px;
float: left;
width: 784px;
background: url('http://www.shrani.si/f/1v/11x/1yv5DwU6/nav-bg.png');}
{width: 8px;
height: 36px;
float: right;
background: url('http://www.shrani.si/f/q/l4/VaHWUz1/navld.png');
background-position: top right;}
<div id="navbar">
<div id="nav-l"></div>
<span class="inbar"></span>
<div id="nav-r"></div>

07-18-2011, 07:31 PM

border-radius: ;
-webkit-border-radius: ;
-moz-border-radius: ;

in the future


try floating the right end to the left instead of the right. this will fix the problem, but in the future you want to position: absolute; the ends with NEGATIVE values. In any case, you should really just use css (border-radius) to make curves