Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 12-15-2005, 09:50 PM   #1 (permalink)
sarah31
Code Monkey
 
sarah31's Avatar
 
Join Date: May 2002
Location: canada
Posts: 55
sarah31 is on a distinguished road
css issues

My website's css has issues in IE and Opera which I have been unable to figure out. While I use neither it disturbs me that my site does not parse correctly in one of the most commonly used browsers.

The issue I am having is with the site header/banner at the top. Here is the site:

Prairie Sable

and here is the CSS:

CSS

Everything looks great in Netscape, Firefox, and Safari. In Opera most of the the key layout code is not parsing at all so it looks like total crap. In IE the title banner/header parses incorrectly while the rest of the site looks mostly okay (except for minor spacing issues between the centre and left content oxes).

If anyone can help I would be greatful since I cannot figure out how to fix it in the two stubborn browsers without funking it all up in FF, Netscape and Safari.
sarah31 is offline   Reply With Quote
Old 12-16-2005, 01:50 AM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 676
DJMaze is on a distinguished road
Code:
#Header {
	color:#336600;
	font-size:28px;
	margin: 0px 0px 10px 0px;
	padding:16px 0px 0px 10px;
	/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
	height:50px; /* 14px + 17px + 2px = 33px */
	border-style:solid;
	border-color:black;
	border-width:2px 0px; /* top and bottom borders: 2px; left and right borders: 0px */
	line-height:11px;
	background-color:#eee;
	/* background-image: url(../images/Sable1.jpg);
	background-repeat: no-repeat; */
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. 
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. 
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style 
declaration. The incorrect IE5/Win value is above, while the correct value is 
below. See http://glish.com/css/hacks.asp for details. */
	voice-family: "\"}\"";
	voice-family:inherit;
	height:50px; /* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct 
length values to user agents that exhibit the parsing error exploited above yet get 
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#Header {height:50px;}
DJMaze is offline   Reply With Quote
Old 12-16-2005, 02:23 AM   #3 (permalink)
sarah31
Code Monkey
 
sarah31's Avatar
 
Join Date: May 2002
Location: canada
Posts: 55
sarah31 is on a distinguished road
Thanks but after some mucking I decided to drop the header bar altogether. Some of the css still doesn't show in Opera but everything is fine with IE so I am happy enough.
sarah31 is offline   Reply With Quote
Old 12-23-2005, 06:43 AM   #4 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 676
DJMaze is on a distinguished road
Look at mine compared to yours and you see the difference in height size.
If you build fixed size areas you must properly identify height and width (sometimes also the z-index)
Yours was way to small to get the header straight, IE just ignores your settings and resizes the <div> header so that the font fits.

Instead you could use the min-height which makes it sizeable but with a minimal height.
As an example look at the header of following page of mine in all your different browsers http://dragonflycms.com/
DJMaze is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Dynamic CSS files with PHP metazai PHP 28 06-28-2005 10:30 AM
CSS List Navigation geek HTML, XML, Javascript, AJAX 0 03-03-2005 07:06 PM
CSS Explorer trouble (of course) easilyi HTML, XML, Javascript, AJAX 6 11-11-2004 03:59 PM


All times are GMT -8. The time now is 10:36 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting