...

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



bart77
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">
<html>
<head>
<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;}
#nav-l
{position: absolute;
width: 8px;
height: 36px;
float: left;
background: url('http://www.shrani.si/f/q/l4/VaHWUz1/navld.png');}
#navbar
{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');}
#nav-r
{width: 8px;
height: 36px;
float: right;
background: url('http://www.shrani.si/f/q/l4/VaHWUz1/navld.png');
background-position: top right;}
</style>
</head>
<body>
<div id="navbar">
<div id="nav-l"></div>
<span class="inbar"></span>
<div id="nav-r"></div>
</div>
</body>
</html>

Sammy12
07-18-2011, 07:31 PM
use:

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum