[WSG] CSS in IE Help needed.

2005-12-14 Thread Al Kendall



  
  

Can anyone please tell me how to fix the following script to get the
div the stay in the center of the page in IE. It works fine in
Firefox, but stay left in IE.


body {
 margin: 0px;
padding: 0px;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 12px;
line-height: 22px;
color: black;
background-color: #ccc;

}
 .innerBox {
padding: 10px;
margin: 10px 0px 5px 0px;
border: 1px solid #000;

}
 #content {
padding: 10px;
margin-top: 5px;
margin-bottom: 5px;
margin-right: auto;
margin-left: auto;
background-color: #fff;
border: 1px solid #000;
width: 70%;

}


body
div id=content
  Lorem ipsum dolor sit amet,consectetuer adipiscing
elit,sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
div class=innerBox
  Ut wisi enim ad minim veniam,quis nostrud
exercitation ulliam corper
suscipit lobortis nisl ut aliquip ex ea commodo consequat.
  
/div

Duis autem veleum iriure dolor in hendrerit in vulputate velit esse
molestie consequat,vel willum lunombro dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit
praesent luptatum zzril delenit augue duis dolore te feugait nulla
facilisi.
  
/div

/body

-- Cheers!Al Kendall


Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Bert Doorn

G'day

Al Kendall wrote:

Can anyone please tell me how to fix the following script to get the div the
stay in the center of the page in IE.   It works fine in Firefox, but stay
left in IE.


Add this to your existing CSS:

body { text-align:center }
#content { text-align:left }

Regards
--
Bert Doorn, Better Web Design
http://www.betterwebdesign.com.au/
Fast-loading, user-friendly websites


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Ric Jude Raftis

Try this Al

#content {
padding: 10px;
margin:5px auto;
background-color: #fff;
border: 1px solid #000;
width: 70%; /* remove this because you are setting your margin to auto*/
}

Regards,

Ric



Al Kendall wrote:



Can anyone please tell me how to fix the following script to get the 
div the stay in the center of the page in IE.   It works fine in 
Firefox, but stay left in IE.


**
body {

margin: 0px;
padding: 0px;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 12px;
line-height: 22px;
color: black;
background-color: #ccc;

}

.innerBox {
padding: 10px;
margin: 10px 0px 5px 0px;
border: 1px solid #000;

}

#content {
padding: 10px;
margin-top: 5px;
margin-bottom: 5px;
margin-right: auto;
margin-left: auto;
background-color: #fff;
border: 1px solid #000;
width: 70%;

}


body

div id=content

Lorem ipsum dolor sit amet,consectetuer adipiscing elit,sed
diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat.

div class=innerBox

Ut wisi enim ad minim veniam,quis nostrud exercitation
ulliam corper suscipit lobortis nisl ut aliquip ex ea
commodo consequat.

/div

Duis autem veleum iriure dolor in hendrerit in vulputate velit
esse molestie consequat,vel willum lunombro dolore eu feugiat
nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi.

/div

/body



--
Cheers!

Al Kendall 



**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Ben Wong
On 12/14/05, Ric  Jude Raftis [EMAIL PROTECTED] wrote:
 Try this Al

 #content {
 padding: 10px;
 margin:5px auto;
 background-color: #fff;
 border: 1px solid #000;
 width: 70%; /* remove this because you are setting your margin to auto*/
 }

errr...then the div will fill the page...
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Ric Jude Raftis
Apologies...you're right.  Leave the width, although I would be setting 
it to 760px so it was effectively 100% in 800 x 600 and have margins in 
larger resolutions.  I really don't understand why people want these 
margins though.  I feel a site should be fluid to 100% irrespective of 
resolution.


Thanks for the correction.

Regards,

Ric

Ben Wong wrote:


On 12/14/05, Ric  Jude Raftis [EMAIL PROTECTED] wrote:
 


Try this Al

#content {
padding: 10px;
margin:5px auto;
background-color: #fff;
border: 1px solid #000;
width: 70%; /* remove this because you are setting your margin to auto*/
}
   



errr...then the div will fill the page...
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



 



**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Bert Doorn

G'day

I feel a site should be fluid to 100% irrespective of 
resolution.


While I agree with you in principle...  Have you ever seen a site 
at 1280x1024 or higher resolution, 100% width and (as some 
designers seem to be keen on), microscopic (12px or smaller) 
text?  Not easy to read.


Regards
--
Bert Doorn, Better Web Design
http://www.betterwebdesign.com.au/
Fast-loading, user-friendly websites

**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] CSS in IE Help needed.

2005-12-14 Thread Ric Jude Raftis
Yes, I have and in my humble opinion, poor design.  Px heights for fonts 
are not recommended and will cause problems with higher resolution 
monitors at 96px and in future above.


Recommendations are to set font sizes at percentages or ems.  I set my 
font size to 100% in my body of the css and then use ems for the rest of 
the settings.


Regards,

Ric

Bert Doorn wrote:


G'day


I feel a site should be fluid to 100% irrespective of resolution.



While I agree with you in principle...  Have you ever seen a site at 
1280x1024 or higher resolution, 100% width and (as some designers seem 
to be keen on), microscopic (12px or smaller) text?  Not easy to read.


Regards



**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**