Hi,
This must be a real easy thing to do, but I can not think how to do it.
I have a image in a list with the text next to the image in an anchor tag. I am trying to center the text in the span tag it works ok in IE7 but Firefox is ignoring it. Can any one help. I hope the code make sense.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html>
<head>
<title>UnionView</title>
<link rel="stylesheet" type="text/css" href="css/global.css" media="screen"/>
</head>
<body>
<div class="PageWrapper">
<div class="AdvertiseBanner"><p> Advertising Banner</p></div>
<div class="MainContent">
<div class="PageHeader">
<h2 class="PageTitle"><span>UnionView</span></h2>
<div class="NavBar">
<ul>
<li><a href="#"><img src="media/help_icon.jpg" alt="" title="" /><span>test</span></a></li>
<li><a href="#"><img src="media/uni_icon.jpg" alt="" title="" /><span>test</span></span></a></li>
<li><a href="#"><img src="media/aboutus_icon.jpg" alt="" title="" /><span>test</span></a></li>
<li><a href="#"><img src="media/contact_icon.jpg" alt="" title="" /><span>test</span></a></li>
</ul>
</div>
</div>
<div class="InnerContent"></div>
<div class="FooterBar"></div>
</div>
</div>
</body>
</html>
CSS
body{
background: #fafafa url(../media/bg_shadow.jpg) top center;
}
body, h1, h2, h3, p, ul, li{margin:0;}
ul, li{padding:0}
a{outline:none}
a img{border:none;}
.AdvertiseBanner{
}
.PageWrapper{
position:relative;
width:998px;
height:1000px;
margin:0 auto;
}
.MainContent{
float:left;
width:936px;
margin-top:265px;
padding:10px 34px 0 37px;
}
/* Header
====================================*/
.PageHeader{
float:left;
}
.PageTitle{
float:left;
margin-top:30px;
width:253px;
height:39px;
background-image:url(../media/unionview_logo.jpg);
}
.PageTitle span{display:none;}
.NavBar{float:right;}
.NavBar li{
list-style:none;
float:left;
display:block;
margin-right:25px;
text-align:center;
}
.NavBar li span{float:left;}
This must be a real easy thing to do, but I can not think how to do it.
I have a image in a list with the text next to the image in an anchor tag. I am trying to center the text in the span tag it works ok in IE7 but Firefox is ignoring it. Can any one help. I hope the code make sense.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html>
<head>
<title>UnionView</title>
<link rel="stylesheet" type="text/css" href="css/global.css" media="screen"/>
</head>
<body>
<div class="PageWrapper">
<div class="AdvertiseBanner"><p> Advertising Banner</p></div>
<div class="MainContent">
<div class="PageHeader">
<h2 class="PageTitle"><span>UnionView</span></h2>
<div class="NavBar">
<ul>
<li><a href="#"><img src="media/help_icon.jpg" alt="" title="" /><span>test</span></a></li>
<li><a href="#"><img src="media/uni_icon.jpg" alt="" title="" /><span>test</span></span></a></li>
<li><a href="#"><img src="media/aboutus_icon.jpg" alt="" title="" /><span>test</span></a></li>
<li><a href="#"><img src="media/contact_icon.jpg" alt="" title="" /><span>test</span></a></li>
</ul>
</div>
</div>
<div class="InnerContent"></div>
<div class="FooterBar"></div>
</div>
</div>
</body>
</html>
CSS
body{
background: #fafafa url(../media/bg_shadow.jpg) top center;
}
body, h1, h2, h3, p, ul, li{margin:0;}
ul, li{padding:0}
a{outline:none}
a img{border:none;}
.AdvertiseBanner{
}
.PageWrapper{
position:relative;
width:998px;
height:1000px;
margin:0 auto;
}
.MainContent{
float:left;
width:936px;
margin-top:265px;
padding:10px 34px 0 37px;
}
/* Header
====================================*/
.PageHeader{
float:left;
}
.PageTitle{
float:left;
margin-top:30px;
width:253px;
height:39px;
background-image:url(../media/unionview_logo.jpg);
}
.PageTitle span{display:none;}
.NavBar{float:right;}
.NavBar li{
list-style:none;
float:left;
display:block;
margin-right:25px;
text-align:center;
}
.NavBar li span{float:left;}