By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,282 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

how to display inline navigation next to an img using css? works in IE not mozilla

P: 2
I've got this to finally work in IE (its only taken me 2 days solid), but now mozilla isn't displaying the text on the same line as the image. I'm a newby at CSS, and I've think I've worked on trying to resolve this too long and now I'm totally lost.

I've posted this up to a site:
*************************Uploaded to SERVER ********************
www.onlinecreations.com.au/wtts/index.php
like I said, works in IE but not Mozilla.

I just want the image to display top left, heading centered next to the image on the same line and the navigation bar to display under the heading next to the image as well.

I'd appreciate any and all help. PLEASE.

Also it appears that there are margins in Mozilla for the page (I don't want them), but not for IE. How do I get rid of them in Mozilla?

This is my CSS 3 column Hdr & Ftr code (it goes on for a while):

************************CSS code *****************************

body{
margin: 0 0 0 0;
padding:0 0 0 0;
background:#254117;
color: #347235;
}

#navbar {
position:absolute
top: 35px
left: 150px;
margin: 0 20px 0 0;
padding: 0 0 0 0;
width:100%;
height:15px;
background:#ffffff url(img/nav_bg.jpg);
text-align:left;
color:#000000;
font-size:.9em;
z-index:7;
}


/* navigation bar contents*/

#nav ul{
padding:0 0 0 13%;
margin: 0 0 0 0;
white-space: nowrap;
font-size:0.9em;
color:#ffffff;
float:left;
width:87%;
height:15px;
background:transparent;
list-style:none;
}

#nav ul li{
display:inline;
list-style:none;
}

#nav ul li a{
margin: 0 0 0 0;
padding: .4em 1em .46em 1em;
color:#ffffff;
text-decoration:none;
float: left;
border-left:1px solid #999999;
background:transparent;
}

#nav ul li a:hover{
color:#4AA02C;
text-decoration:none;
border-left:1px solid #999999;
}
/* end navigation bar */

#left_col{
position:absolute;
top:145px;
left:0;
background-color: #347235;
width:140px;
height: 100%;
z-index:3;
color: #000000;
}

#right_col{
position:absolute;
top:145px;
right:0;
width:140px;
z-index:2;
background:#347235;
color: #333333;
}

#center_block {
width:100%;
z-index:1;
background:#347235;
color: #333333;
height:80%;
}

#header {
position: absolute;
top: 0;
left: 250px;
margin: 0 0 0 0;
height:50px;
border-bottom:1px solid #000000;
width:50%;
background:#4AA02C;
color: #000000;
z-index:6;

}

#header_block {
position:relative;
margin:0 20px 0 20px;
padding:0 0 0 0;
width:250px;
background:#347235;
text-align:left;
color:#eeeeee;
}

#center_col{
margin:0 142px 0 142px;
position:relative;
background:#ffffff;
color: #333333;
z-index:5;
border: solid #000000;
border-width:0 1px;
}

#footer {
width:100%;
height:35px;
border: solid #000000;
border-width:1px 0;
background:#254117;
color: #4AA02C;
margin:0;
}

/* workarounds and hacks */
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.clearfix {display: inline-table;}

/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

p {
padding: 0 15px;
}

h4, h3 {
margin:0;
padding: 5px 0;
}

p:first-letter {
font-size: 140%;
font-weight: bold;
color: #254117;
}

h1 {
font-size: 250%;
font-weight: bold;
color:green;
vertical-align: text-top;

}

h2 {
font-size: 150%;
font-weight: bold;
color:green;
}

******************************** HTML CODE following**************

I have the html code (relevant part of it) here:

<div class="top"></div>

<div class="page_wrap clearfix">

<!-- header div -->
<div class="header">
<!-- header block div -->
<div class="header_block"><img src="img/wtts_logo_brush.gif" align="left"/>
<h1><center>Willow Tree Training Pty Ltd</center></h1>

<!-- nav bar div -->
<div class="navbar" id="nav">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="training.php">Training</a></li>
<li><a href="youth.php">Youth Services</a></li>
<li><a href="worker.php">Worker Training</a></li>
<li><a href="consultancy.php">Consultancy</a></li>
<li><a href="business_awards.php">Business Awards</a></li>
<li><a href="contact.php">Contact Us</a></li>
<li><a href="about.php">About Us</a></li>
<br />&nbsp<br />
</ul>
</div> <!-- end nav bar div -->

</div> <!-- end header_block div -->
</div> <!-- end header div -->
</div> <!-- end page wrap clearfix div -->
Sep 7 '06 #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,916
Sorry message removed on the grounds it was total rubish
Sep 7 '06 #2

P: 2
why is it total rubbish? Its a problem that I have displaying CSS controlled pages, I've included the CSS and the HTML. I've included an address so that you can see the problem working.
Sep 7 '06 #3

Banfa
Expert Mod 5K+
P: 8,916
Sorry Jannette, the message I had posted was total rubbish not your post or page.

I jumped to a conculusion that was wrong because I was at work and only had IE available.

I have now looked at the page in FireFox and IE and they appear the same to me can you give a better description of where the problem you are seeing is, or have you fixed it.
Sep 8 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.