Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2005, 8:04 AM   #1
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
IE Compatibility, margin: auto; (centering)

Hey guys long time no see, I was macking with some XHTML and ran into some problem in IE, this site needs to be readable for everybody, and then i thought of you wise guys inhere ..

http://home.no/dezza/9kilo.dk/

Here is the site, try taking a look in IE, margin: auto; won't work in IE. And there ain't no margin top neither?

What do i need to do to make this site look identical in IE? I've tried searching for margin: auto; and what I found was to do a text-align: center; and then make the <p> tag text-align: left; again, but isn't there a more smart way to do this or? IE seems weird!

I've heard of some DOCTYPE mod for IE which makes IE follow the laws of true XHTML like firefox, is that right?

Thanks in advance guys ..
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Oct 28th, 2005, 9:47 AM   #2
bja888
Hobbyist Programmer
 
bja888's Avatar
 
Join Date: Oct 2005
Location: Central, FL
Posts: 213
Rep Power: 0 bja888 is an unknown quantity at this point
Send a message via AIM to bja888 Send a message via Yahoo to bja888
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

About your xhtml parceing question. The DTD should be global and all browsers should treat it the same. Too bad enternet explorer doesn't support anything. I don't even think it supports html.

Off hand I would say that there is no easy way out of this proublem. I personally have never delt that much with the margin css attribute mostly due to my protest of xhtml and the W3.

It is proublay just a IE proublem. Personally, how I would do it....
[html]
<div style="width:100%;">
<div style="width:750px;">
All of the body content goes here.
</div>
</div>
[/html]

text-aling, only aligns text in FF. You cant center a page useing it.
bja888 is offline   Reply With Quote
Old Oct 28th, 2005, 11:22 AM   #3
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
text-align can be used for the whole page yes .. And why protest against something as clean and pure like xhtml and w3?

That code you posted won't center the page just ruin the liquid layout ..
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Oct 31st, 2005, 7:13 AM   #4
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
If i do something like:

* {
  text-align: left;
}

and then make a <div id="center"></div> (with text-align: center tag around nav, header, and content, and keep the margin: 0 auto 0 auto, the navigation bar moves a little to the right and i get a hole at the left of the nav bar .. I can't do without margin: 0 auto 0 auto; because then it's not centered in firefox, then the nav is left-aligned ..

Can somebody tell me how to fix this?

I uploaded a new version without margin: 0 auto 0 auto and the new text-align div. still at address: http://home.no/dezza/9kilo.dk
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Nov 6th, 2005, 9:38 PM   #5
Agent 47
Hobbyist Programmer
 
Agent 47's Avatar
 
Join Date: Nov 2005
Posts: 122
Rep Power: 3 Agent 47 is on a distinguished road
Quote:
Originally Posted by dezza
text-align can be used for the whole page yes .. And why protest against something as clean and pure like xhtml and w3?.
Because he just doesn't know what he's talking about.

Check this thread out...
http://www.programmingforums.org/for...ead.php?t=6758
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet"
Agent 47 is offline   Reply With Quote
Old Nov 7th, 2005, 1:10 AM   #6
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
exactly... is there any way to corral this guy to threads he started?
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Nov 13th, 2005, 6:12 AM   #7
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
Thank you very very much Now i'm only one step away from making it almost identical!

Check it out now:
http://home.no/dezza/9kilo.dk

Now i only have one problem left, the two absolute positioned div boxes to the right of the header image .. They seem to have some sort of margin or padding at the top in IE, although i have set margin and padding to 0 in * { } .

Can someone help me here?

I really appreciate your help
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Old Nov 13th, 2005, 1:54 PM   #8
bja888
Hobbyist Programmer
 
bja888's Avatar
 
Join Date: Oct 2005
Location: Central, FL
Posts: 213
Rep Power: 0 bja888 is an unknown quantity at this point
Send a message via AIM to bja888 Send a message via Yahoo to bja888
Sorry about that dezza. When I posted this I was not familiar with "margin". Glad you found a solution though.
bja888 is offline   Reply With Quote
Old Nov 18th, 2005, 3:41 AM   #9
dezza
Newbie
 
dezza's Avatar
 
Join Date: Mar 2005
Location: Denmark
Posts: 16
Rep Power: 0 dezza is on a distinguished road
Send a message via ICQ to dezza Send a message via MSN to dezza
Can anyone help me with the 2 div boxes?
__________________
Come in and have a talk!
#programmingforums @ Freenode

Specialities: Linux, XHTML/HTML and CSS.
Learning: Python

Folding@Home Stats

System Requirements: Windows 9x/ME/2000/XP or better
Okay, that makes it run on Linux right?
dezza is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:03 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC