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 01-17-2008, 06:31 PM   PM User | #1
xiaodao
Regular Coder

 
Join Date: Sep 2004
Posts: 713
Thanks: 6
Thanked 2 Times in 2 Posts
xiaodao is an unknown quantity at this point
css fine in firefox, but distore totally in ie

my webpage is here

http://www.yanmin.net/help/index.html

this page is fine in firefox, but distore in IE, cannot center in the screen, cannot display properly, please help me if you free by right click and view source, all style sheet are there, if you can point out my mistake, i will be very appreciate
__________________
flying dagger
xiaodao is offline   Reply With Quote
Old 01-17-2008, 06:39 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
This is partially your fault. You NEED a doctype or IE goes into quirks mode.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Add that to the top of your page. BTW there is also a WHOLE sticky about doctypes.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 01-17-2008, 06:56 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Yes xiaodao, you need both a DocType and Character encoding.
You should make the beginning of your markup read like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style>
body{
	background-color:#333;
	font-family:tahoma;
	font-size:12px;

Then you should run it through the validator. See my sig below.


One thing I noticed right off, you're using clear:both; a lot... it seems like maybe you want to clear your floats with it? In #main you have several floats that are not being wrapped by #main. Change that CSS to this:
Code:
#main{
	overflow: auto;
	width:745px;
	padding:0px;
	position:relative;
	margin:0 auto;
}
overflow:auto; is clearing your floats now. To see the difference (view it in FF), put a background color on #main and look at it with and without the overflow setting.

Overflow:auto; explained.

... one more thing, you may want to experiment with that character encoding. I have no experience with the language your using on your webpage.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-17-2008, 06:57 PM   PM User | #4
xiaodao
Regular Coder

 
Join Date: Sep 2004
Posts: 713
Thanks: 6
Thanked 2 Times in 2 Posts
xiaodao is an unknown quantity at this point
thanks, very thank you
__________________
flying dagger
xiaodao is offline   Reply With Quote
Reply

Bookmarks

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 12:51 PM.


Advertisement
Log in to turn off these ads.