![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
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? |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
<!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. |
|
|
|
|
|
#3 |
|
Newbie
|
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? |
|
|
|
|
|
#4 |
|
Newbie
|
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? |
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 122
Rep Power: 3
![]() |
Quote:
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" |
|
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
exactly... is there any way to corral this guy to threads he started?
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#7 |
|
Newbie
|
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? |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
|
Sorry about that dezza. When I posted this I was not familiar with "margin". Glad you found a solution though.
|
|
|
|
|
|
#9 |
|
Newbie
|
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? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|