ie6 font-size problem

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
aragornmouf
New Member
New Member
Posts: 3
Joined: Tue May 12, 2009 4:12 pm

ie6 font-size problem

Post by aragornmouf »

Hey,

I'm working on Http://www.weekendermagazine.com and everything was going fine, then I had to start checking it in ie6, I've fixed most of the issues I've found, but I can't seem to get the menu font size to work right. all of the font sizes for ie6 are defined in px.

here's my ie6 style sheet

Code: Select all

body{
margin:0;
padding:0;
font-family: tahoma,verdana,sans-serif;
text-align:center;
background: url(uploads/images/DO_NOT_DELETE/bg3.gif) top center repeat;
font-size:10px
}
a{
text-decoration:none;
font-weight:bold;
color: Black;
font-size:10px;
}

a:hover{
text-decoration:underline;
color: Black;
font-size:10px;
}

p{
margin:0 0 0 0;
font-size:10px;
}

h1,h2,h3,h4{
margin:0;
padding:0;
font-weight:normal;
}

h1{
font-size:20px;
letter-spacing:-3px;
color:#567;
margin:12px 0 5px 20px;
}

h1 a:hover{
text-decoration:none;
}

h2{
font-size:18px;
}

h3{
color: #555;
font-size:14px;
margin:1% 0 0.5% 0.5%;
}

h4{
font-size:13px;
font-weight:bold;
}

#container{
margin-left: auto;
margin-right: auto;
width: 975px;
text-align: left;
background: url(uploads/images/DO_NOT_DELETE/bg.gif) top center repeat-y;
font-size:10px;
}

#sitetitle{

height:117px;
background:url(uploads/images/DO_NOT_DELETE/header.gif) top center no-repeat ; 
width: 975px;
z-index: 5;
font-size:10px;
}
.weather{
top:0px;
margin-left:60px;
}
#simpleslider {
top: -35px;
}
#content_home {
margin-top: -25px;
margin-left: 30px;
}
#sitetitle a{
color:#567;
font-weight:normal;
visibility:hidden;
}

#sitetitle a:hover{
color:#269;
}

#menu{
text-align: right;
margin-right: 40px;
font-size:12px;
}
#primary-nav li{
list-style:none;
width: auto;
float:right;
position:relative; 
top: -50px;
padding: 5px; 
font-size:12px;
font-family: Arial, sans-serif;
}
#primary-nav a{
top: 0px;
font-family: Arial, sans-serif;
font-weight:normal;
font-size:12px;
}
#primary-nav a{display:block;
margin-top:0px;
font-weight:normal;
letter-spacing:-1px;
color: #000;
font-size:12px;
}
#primary-nav a:hover {
text-decoration:underline;
font-size:10px;
}
#content{
margin-top:0px;
width:100%;
}
* html body #content{
margin-top:24px;
width:900px;
clear:both;
}
#content h2{
margin:0 0 10px 0;
color:#555;
}

#content h2 a{
color:#555;
font-weight:normal;
}

#content h2 a:hover{
color:#269;
text-decoration:none;
background:none;
}

#content p{
margin:0.5% 1% 0.8% 1%;
}

#left{
width:60%;
float:left;
}

#right{
margin-left:65%;
margin-top:-15px;
}


#right h2{
margin:15px 0 5px 0;
width:98%;
font-size:10px;
}
.contactform{
width: 400px;
}
#footer{
clear:both;
padding:10px 0 12px 24px;
text-align:left;
color:#FFFFFF;
margin-left: 10px
}

#footer a{
color:#888;
font-weight:normal;
}

#footer span{
color:#aaa;
font-size:2px;
letter-spacing:-2px;
}

.entry{
position:relative;
margin-left:5px;
color:#333;
padding:0px 0px 0 0px;

}

.entry a:hover, .intro a:hover{
text-decoration:none;
padding-bottom:2px;
}

.link{
color:#269;
background:url(uploads/andeas04/linkarrow.gif) left no-repeat;
display:block;
margin:4px 0 0 0;
padding:2px 1%;
}

.link:hover{
color:#48b;
text-decoration:none;
}

.thumbs img{
position:relative;
padding:3px;
margin:0 2px 2px 0;
background-color:#ddd;
color: #555;
}

.thumbs img:hover{
background: url(uploads/andeas04/flash.gif); /* Delete this line to remove the blinkingblue frame around the thumbnails */
}

.entryphoto{
margin:5px 10px 10px 0;
float:left;
padding:3px;
background-color:#ddd;
color:#333;
}

.meta{
clear:both;
padding: 5px 1px 0 0;
margin:10px 0 0 0;
text-align:right;
font-size:0.9px;
color: #567;
}

.pagenav{
color: #888;
text-align:center;
}

.entry img{
position:relative;
}

.subcontainer {
width:98%;
}

.rightsub{
float:left;
width:40%;
margin-left:10%;
margin-top:0px;
}

.rightsub2{
margin-left:50%;
}

.date{
float:left;
font-weight:bold;
}

.right{
text-align:right;
}

.center{
text-align:center;
}

.clear{
clear:both;
}

.hide{
display:none;
}
Deak

Re: ie6 font-size problem

Post by Deak »

The quick solution to this -- given that it is a problem isolated to your menu -- would be to use a small CSS hack. This works by using a CSS selector that only IE6 will recognise and other browsers ignore.

* html #menu
{
font-size: whateversizeyoulike;
}

To make your life easier, and only use this hack once, clean up your CSS so you're only setting the font size for your menu once (in your #menu selector). I notice you've redundantly set it in the A and LI too.

If time is less of a factor and you want to have a stronger basis going forward for future projects, try using and working with a CSS reset. This will effectively zero all elements across all browsers, and give you a level playing field. It's more work, since you will need to specifically set things you normally take for granted, but the pay-off is much better cross-browser rendering.

Two I recommend are Meyer's and Yahoo's:

http://meyerweb.com/eric/tools/css/reset/

http://ws1.ydn.a1.b.yahoo.com/yui/reset/
Post Reply

Return to “Layout and Design (CSS & HTML)”