Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-18-2011, 09:44 AM   PM User | #1
bart77
New to the CF scene

 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bart77 is an unknown quantity at this point
Navbar div background, Chrome, resize, gap

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:

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>

Last edited by bart77; 07-18-2011 at 09:47 AM..
bart77 is offline   Reply With Quote
Old 07-18-2011, 06:31 PM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
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

Last edited by Sammy12; 07-18-2011 at 06:34 PM..
Sammy12 is offline   Reply With Quote
Reply

Bookmarks

Tags
background, chrome, div, navbar, zoom

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:52 PM.


Advertisement
Log in to turn off these ads.