|
|||||||
| CSS Discussion and technical support relating to Cascading Style Sheets. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Centered fixed width in IE
Hello,
I am trying to center the body in an osCommerce site, the current style is body { width: 950px; margin: 0 auto; } this works perfect in firefox, but not in IE, if anybody could help me to center the body in IE ill be very thankful... |
|
#2
|
||||
|
||||
|
There are some weird browser issues with giving style to the body. What you should do is create a <div> with a width of 950px, then center it. Put your entire site in the <div>. In other words, the body is supposed to get it's dimensions from the window manager, not from a style sheet. What is the body supposed to reference when finding a center?
.css: div.content {width:950px; margin:0 auto} //top-bot 0, left-right auto This has a benefit of forcing horizontal scroll bars for windows that are smaller than 950 px. However, you should rethink your design, so that horizontal scrolling will never, ever, ever, ever happen. Proper design will make your page flow to the users setting, not force setting upon the user. --Dave |
|
#3
|
|||
|
|||
|
Hey thanks for your replay, i didnt know that about the body, i will do as you recommend...
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|