Div borders & different browsers

This is a discussion on "Div borders & different browsers" within the Web Page Design section. This forum, and the thread "Div borders & different browsers are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 6th, 2008, 23:17
Junior Member
Join Date: Oct 2007
Location: UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Div borders & different browsers

I'm having trouble with the way different browsers treat borders, currently I have the page working in the latest versions of FF, Opera and IE, but in Safari 3 (win vers.) and IE6 there is a small white gap on the right hand side between the menu divs and the container-border div. Setting *{margin: 0} makes the page work in Safari, but breaks in everything else.

The HTML is:
HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container" class="container"><div class="containerBorder">

<div id="menu1" class="menu" onclick="menuShow('menu1menu')"><div class="border">Menu 1</div></div>
<div id="menu2" class="menu" onclick="menuShow('menu2menu')"><div class="border">Menu 2</div></div>
<div id="menu3" class="menu" onclick="menuShow('menu3menu')"><div class="border">Menu 3</div></div>
<div id="menu4" class="menu" onclick="menuShow('menu4menu')"><div class="border">Menu 4</div></div>
<div id="menu5" class="menu" onclick="menuShow('menu5menu')"><div class="border">Menu 5</div></div>

</div></div>

</body>
</html>
and the CSS is:
Code: Select all
div.container
{
width:80%; 
height:400px; 
margin-left:auto; 
margin-right:auto; 
text-align:center; 
}

div.containerBorder
{
border-style:solid; 
border-width:3px;
height:400px;
}

div.menu
{
width: 20%; 
float: left;
}

div.border
{
border-style:solid; 
border-width:3px;
}
You can also view/save the page and css from:
http://www.iliveinabin.com/Styles.html
http://www.iliveinabin.com/Style.css

I created the border divs to get the page to work in IE7, not sure if there's another way to do it? Please can anyone help me get the page to work in these main browsers?
Reply With Quote

Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Translucent Borders? jjpeacha Web Page Design 10 Apr 29th, 2007 20:27
Help with div borders in FF, please? Donny Bahama Web Page Design 12 Apr 10th, 2007 20:09
Tables and 1px borders? Perad Web Page Design 3 Dec 9th, 2006 19:34
Disappearing borders Dotty Web Page Design 2 May 18th, 2006 13:06
borders benbacardi Web Page Design 2 Jun 4th, 2004 15:39


All times are GMT. The time now is 02:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43