Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Cross Browser Compatiability issue?
Old 08-19-2009, 06:42 PM Cross Browser Compatiability issue?
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
Okay, This is my first real attempt at CSS, Right now it is just plain no images. Just using it to position all the information on a page for dynamic data injection from PHP.

EDIT::: Question, Why doesn't CSS work in IE, but not in FF when it comes to positioning? Details below contain the code that is used, what and where.

Anyways first off Some images since the site I am working on is not hosted live on any servers except my private dev server. So all images are screen shots. Browsers used are FF 3.5, IE 8, IE 7, FF 3.0.12



The one on the left is what it should look like in all browsers, and the one on the right is how it looks in IE 7 & 8

I am using codeigniter to as php frame work, and It loads the loader page, since the final page will be larger than content space so it is in a frame to allow scroll bars so it loads correctly formatted. This is the code it loads
HTML Code:
<object id="embeddedhtml" type="text/html" xml:lang="en-us" data="http://10.0.0.4/dev/xTermDialysis/index.php/welcome/test_output2" width="100%" style="background-color:white;border:thin;" title="In Progress Session Viewer"  height="600"></object>
When that code executes it calls the page with this code to display it (this is incomplete just a fraction of what will be on the page)
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="http://10.0.0.4/dev/xTermDialysis/form.css" rel="stylesheet" type="text/css" />
</head>

<body style="font-size:0.8em;">
<div id="dialysis">
	<div id="patientinfo">
		<!-- Patient Info -->
		<div id="patientinfo" class="Col1">
			Patient Name {name}<br />
			Date : {timestamp}
		</div> 
		<div id="patientinfo" class="Col2">
			Flow Sheet ID # {session_id}<br />
			Bar Code # {true_patient_id}
		</div>	
		<div id="patientinfo" class="Col3">
			Nephrologist {nephro}<br />
			Reviewed By RN {nurse}
		</div>
	</div>
	<br />
	<!-- Pretretment Info -->
	<div id="PretreatmentInfo_Left">
		<div id="PretreatmentInfo_Left" class="Header">Pretreatment Vitals</div>
		<div id="PretreatmentInfo_Left" class="Col1">
			Sitting BP<br />
			Standing BP<br />
			Temp<br />
			Previous Post Weight<br />
			Todays Weight<br />
			Dry Weight <br />
			Fluid To Remove<br /><br />
		</div>
		<!-- Colume for BP and Temp -->
		<div id="PretreatmentInfo_Left" class="bloodpress">
			000/000<br />
			000/000<br />
			{temp}<br />
		</div>
		<!-- Colume for Pulse and Weights -->
		<div id="PretreatmentInfo_Left" class="Col2">
			Pulse 0<br />
			Pulse 0<br />
			<br />
			{ppw}<br />
			{tw}<br />
			{dw}<br />
			{ftr}<br /><br />
		</div>
		<div id="PretreatmentInfo_Left" class="Header">Labs</div>
		<div id="PretreatmentInfo_Left" class="LabsCol1">
			SST<br />
			Green<br />
			Lavender<br />
		</div>
		<div id="PretreatmentInfo_Left" class="LabsCol2">
			Dark Blue<br />
			Light Blue<br />
			Other<br />
		</div>
		<div id="PretreatmentInfo_Left" class="LabsCol3">
		0<br />0<br />0<br />
		</div>
		
		<div id="PretreatmentInfo_Left" class="LabsCol4">
		0<br />0<br />0<br />
		</div>

		<div id="PretreatmentInfo_Left" class="Header">Dialysate / Product Water</div>
		<div id="PretreatmentInfo_Left" class="DialysateCol">
			Dialysate<br />
			Culture<br />
			LAL<br />
		</div>
		<div id="PretreatmentInfo_Left" class="ProductCol">
			Product <br />
			Culture<br />
			LAL<br />
		</div>
		<div id="PretreatmentInfo_Center">
			<div id="PretreatmentInfo_Center" class="Header">Pretreament Data Collections</div>
		</div>
	</div>
</div>
</body>
</html>
And since doing tables with this layout is very complicated I opted for trying CSS, and this is the css file that is associated with the above page

Code:
/* The following 5 items are use through out the site.  Files are ref'd correctly
.TableHeader{
	background-color:silver;
	text-align:center;
}
.CellCenter{
	text-align:center;
}
.TblCenter{
	margin-left:auto; 
	margin-right:auto;
	border-style: solid;
	border-width: 1px;

}
.TblCenterNoBorder{
	margin-left:auto; 
	margin-right:auto;
}
.TxtCenter{
	margin-left:auto;
	margin-right:auto;
}
/* Begin Dialysis CSS */
#dialysis{
	display:block;
	margin-left:auto;
	margin-right:auto;
	min-width:900px;
	position:relative;	
}
#content{
	
}

/* Patient Info Block */
#patientinfo{
	display:block;
}
#patientinfo.Col1{
	width:150px;
}
#patientinfo.Col2{
	display:block;
	width:235px;
	margin-left:185px;
	margin-top:-31px;
}
#patientinfo.Col3{
	display:block;
	width:250px;
	margin-left:405px;
	margin-top:-31px;
}
/* Pretreatment Info Left (Vitals / Labs) */
#PretreatmentInfo_Left{
	display:block;
	width:200px;
	border:thin;
	border-color:black;
}
#PretreatmentInfo_Left.Header{
	background-color:silver;
	width:200px;
	text-align:center;
}
#PretreatmentInfo_Left.Col1{
	width:100px;
}
#PretreatmentInfo_Left.Col2{
	width:100px;
	margin-left:135px;
	margin-top:-48px;
}
#PretreatmentInfo_Left.bloodpress{
	width:50px;
	margin-left:75px;
	margin-top:-144px;
}
/* Labs for Left Pretreatment */
#PretreatmentInfo_Left.LabsCol1{
	width:50px;
}
#PretreatmentInfo_Left.LabsCol2{
	width:60px;
	margin-left:90px;
	margin-top:-48px;
}
#PretreatmentInfo_Left.LabsCol3{
	width:20px;
	margin-left:65px;
	margin-top:-48px;
}
#PretreatmentInfo_Left.LabsCol4{
	width:20px;
	margin-left:160px;
	margin-top:-48px;
}
#PretreatmentInfo_Left.DialysateCol{
	width:50px;
}
#PretreatmentInfo_Left.ProductCol{
	width:60px;
	margin-left:90px;
	margin-top:-48px;
}
#PretreatmentInfo_Center{
	display:block;
	width:400px;
	margin-left:105px;
	margin-top:-272px;
	/*margin-bottom:225px;*/
	
}
#PretreatmentInfo_Center.Header{
	background:silver;
	text-align:center;
}
So how would I get it to display correctly in all "modern" browsers, I don't want to force end users to go and get firefox if they insist on using IE. Or am I just doomed to use tables?

Thanks in advanced Jon
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1

Last edited by amw_drizz; 08-19-2009 at 08:07 PM.. Reason: Added simple question at top of post
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
 
Register now for full access!
Old 08-19-2009, 07:44 PM Re: Cross Browser Compatiability issue?
dday76's Avatar
Novice Talker

Posts: 8
Name: JDT
Trades: 0
Pushing and floating around divs to create table-ish layouts can be tricky in css. I'm new, but I think if you can repost a somewhat shorter, more specific question, you might have more luck with an answer. It looks like too much stuff to wade through...
dday76 is offline
Reply With Quote
View Public Profile Visit dday76's homepage!
 
Old 08-19-2009, 08:06 PM Re: Cross Browser Compatiability issue?
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
Your probably right, To much info. But the problem though is it can be anywhere in that setup (the problem).
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 08-20-2009, 08:56 AM Re: Cross Browser Compatiability issue?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Pushing and floating around divs to create table-ish layouts can be tricky in css.
Not if you LEARN how it works, it is NOT that complicated.
Quote:
Why doesn't CSS work in IE, but not in FF when it comes to positioning?
CSS DOES work in IE, but IE6 and 7 do have a problem with absolute positioning and the 'stacking order'.
Quote:
And since doing tables with this layout is very complicated I opted for trying CSS, and this is the css file that is associated with the above page
Ok, if what you're doing is outputting DATA, then use a table, that's what they are MEANT for! You can style the table and the data in it with CSS to make it pretty.

You don't need the display:block on all the columns, divs are block-level by default.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-20-2009, 11:23 AM Re: Cross Browser Compatiability issue?
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
Alright, I am in the process of making the table now. I just thought tables were bad and css is the new way to go.

Anyways thanks again for your help
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 08-20-2009, 03:10 PM Re: Cross Browser Compatiability issue?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I just thought tables were bad and css is the new way to go.
Tables FOR LAYOUT is what we discourage, tables for DATA are exactly what they were meant for
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Cross Browser Compatiability issue?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.97309 seconds with 12 queries