Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 06:22 PM
Junior Member
Latest Blog:
None

 
Join Date: 01-28-04
Location: United Kingdom
Posts: 13
iTrader: 0 / 0%
DJ-Craig is liked by many
Firefox VS IE alignment problem

i used the no-lag css navigation bar found in this forum to create a navigation menu for the left of my website. When i load in ie6/7 it is aligned slightly offset to the right compared to what is seen in firefox. I cant get them to align with one another. can anyone help me?

heres a link to the site http://www.cma-design.co.uk/test.html

Firefox View:



IE6/7 View:



heres my html and css code for the site if that helps:

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CMA Design</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head>
<body>
<div id="wrapper" class="clearfix">
<div id="header">
</div> <!-- header -->
<div id="nav">
<img src="slices/navbar.jpg" />
</div> <!-- navigation -->
<div id="left">
<div id="menu">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</div> <!-- menu -->
</div> <!-- left -->
<div id="main">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In convallis odio. Fusce quam enim, vehicula eu, iaculis nec, rutrum nec, sapien. Curabitur sit amet tortor. Nunc dui. Aliquam erat volutpat. Mauris a sem et nulla tristique auctor. Donec eu sapien sit amet nunc aliquam tempor. Aliquam neque mauris, tincidunt at, fringilla sed, rutrum vitae, turpis. Mauris convallis quam at quam. Praesent rutrum lorem sodales sem. Duis pharetra eros sit amet libero. Vestibulum commodo dapibus libero. Fusce varius porttitor nulla. Duis eu quam. Cras sem.

Sed dictum, sapien mattis egestas blandit, odio ante luctus quam, sit amet convallis massa augue eget dolor. Etiam pede pede, dapibus eget, vestibulum sed, luctus et, pede. Integer consequat tempus odio. Quisque eu elit quis sapien interdum adipiscing. Integer a leo. Suspendisse eget nibh auctor elit molestie suscipit. Aliquam vel turpis in massa sodales pulvinar. Aliquam at eros. Praesent vel velit at sem semper facilisis. Donec placerat velit ut massa. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. </p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In convallis odio. Fusce quam enim, vehicula eu, iaculis nec, rutrum nec, sapien. Curabitur sit amet tortor. Nunc dui. Aliquam erat volutpat. Mauris a sem et nulla tristique auctor. Donec eu sapien sit amet nunc aliquam tempor. Aliquam neque mauris, tincidunt at, fringilla sed, rutrum vitae, turpis. Mauris convallis quam at quam. Praesent rutrum lorem sodales sem. Duis pharetra eros sit amet libero. Vestibulum commodo dapibus libero. Fusce varius porttitor nulla. Duis eu quam. Cras sem.

Sed dictum, sapien mattis egestas blandit, odio ante luctus quam, sit amet convallis massa augue eget dolor. Etiam pede pede, dapibus eget, vestibulum sed, luctus et, pede. Integer consequat tempus odio. Quisque eu elit quis sapien interdum adipiscing. Integer a leo. Suspendisse eget nibh auctor elit molestie suscipit. Aliquam vel turpis in massa sodales pulvinar. Aliquam at eros. Praesent vel velit at sem semper facilisis. Donec placerat velit ut massa. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. </p>
</div> <!-- main -->
<div id="footer">
<img src="slices/footer.jpg" />
</div> <!-- footer -->
</div> <!-- wrapper -->
</body>
</html>
Quote:
body {
margin: 0px;
padding: 0;
text-align: center;
min-width: 751px;
background-color: #CCCCCC;
font: 0.7em Verdana, Arial, Helvetica, sans-serif;
}

#wrapper {
text-align: left;
width: 751px;
margin-left: auto;
margin-right: auto;
padding: 0px;
background-image: url('slices/bg.jpg');
}

#header {
height: 251px;
background-image: url('slices/title.jpg');
background-repeat:no-repeat;
width: 751px;
}

#nav {
height: 60px;
width: 751px;
}

#left {
margin: 0px;
padding: 0px;
width: 229px;
float: left;
}

#menu {
height: auto;
width: 175px;
margin-left: 24px;
padding: 0px;
}

#menu li {
height: 24px;
width: 166px;
margin: 5px;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
text-align: left;
text-indent: 25px;
line-height: 24px;
list-style-type: none;
background-image: url('slices/btn.jpg');
background-repeat: no-repeat;
}
#menu li a {
display: block;
width: 100%;
height: 100%;
text-decoration: none;
color: #000000;
}
#menu li a:link {
color: #000000;
background-image: url('slices/btn.jpg');
background-position: 0px 0px;
}
#menu li a:visited {
color: #000000;
background-image: url('slices/btn.jpg');
background-position: 0px 0px;
}
#menu li a:hover {
color: #000000;
background-image: url('slices/btn.jpg');
background-position: 0px -24px;
}
#menu li a:active {
color: #000000;
background-image: url('slices/btn.jpg');
background-position: 0px 0px;
}

#main {
margin: 0px;
padding: 0px;
width: 522px;
float:right;
}

#footer {
margin: 0px;
padding: 0px;
width: 751px;
height: 39px;
float: left;
}

.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
/* End hide from IE-mac */
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #2 (permalink)  
Old 06-13-2007, 10:12 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-06-07
Posts: 84
iTrader: 0 / 0%
alainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the roughalainkun is a jewel in the rough
Send a message via MSN to alainkun
You can specify CSS for diferent navegators, Take a look to this post:
http://www.v7n.com/forums/coding-for...s-problem.html
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #3 (permalink)  
Old 06-14-2007, 02:50 AM
Costin Trifan's Avatar
Coding Tiger
 
Join Date: 04-13-07
Location: Romania
Posts: 3,308
iTrader: 0 / 0%
Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Send a message via Yahoo to Costin Trifan
Your code:
Quote:
<div id="menu">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</div>
My code:
Quote:
<div id="menu">
<ul class="SidebarMenuList">
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
<li class="SidebarMenuListItem"><a href="#">Link</a></li>
</ul>
</div>
Quote:
UL.SidebarMenuList {
display: block;
list-style-type: none;
padding: 0px 0px 0px 0px; /* T R B L */
margin: 0px 0px 0px 0px; /* T R B L */
}
UL.SidebarMenuList LI.SidebarMenuListItem {
display: block;
list-style-type: none;
padding: 5px 5px 5px 5px; /* T R B L */
margin: 0px 0px 0px 0px; /* T R B L */
font-family: Verdana, Sans-Serif;
font-size: 9pt !important;
}
The margin style attribute will help you manage your Menu position in all browsers.

hth
__________________

my private spice

...to be continued
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #4 (permalink)  
Old 06-14-2007, 03:19 AM
Contributing Member
 
Join Date: 01-16-07
Location: Assen, the Netherlands
Posts: 1,361
iTrader: 1 / 100%
Jesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to beholdJesse Vlasveld is a splendid one to behold
Send a message via AIM to Jesse Vlasveld Send a message via MSN to Jesse Vlasveld Send a message via Yahoo to Jesse Vlasveld
Like Costan said. Every browser has different default margin for attributes.

I always start my coding with a margin reset (margin:0) for all attributes. This way I can handle positioning of elements a little easier.
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #5 (permalink)  
Old 06-14-2007, 04:05 AM
Junior Member
Latest Blog:
None

 
Join Date: 01-28-04
Location: United Kingdom
Posts: 13
iTrader: 0 / 0%
DJ-Craig is liked by many
Quote:
Originally Posted by costin_trifan View Post
Your code:


My code:




The margin style attribute will help you manage your Menu position in all browsers.

hth
I tried this, and its probably something im doing wrong but the website now looks like this:

www.cma-design.co.uk/testnav.html

as you can see theres about 3 overlaying buttons for each link, i can get rid of this by changing the amount of padding, but my main concern is that the #main div and #footer div have been thrown out of the site alignment set by my #wrapper container div.

Your help is highly appreciated.
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #6 (permalink)  
Old 06-14-2007, 05:44 AM
Costin Trifan's Avatar
Coding Tiger
 
Join Date: 04-13-07
Location: Romania
Posts: 3,308
iTrader: 0 / 0%
Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Send a message via Yahoo to Costin Trifan
Exclamation read me...or not

Don't take this personally, but you must be joking me....

All you have to do is to take the code I provided above and adjust it for your needs...come on, man... (don't do just copy and paste)

Set the left and right margins for the SidebarMenuListItem to center it into the div container.
If that's not working, then set the margins to the SidebarMenuList to center it.

this is the way I position all my inner containers in the parent containers, so it should work

Cheers.
__________________

my private spice

...to be continued
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #7 (permalink)  
Old 06-14-2007, 06:13 AM
Junior Member
Latest Blog:
None

 
Join Date: 01-28-04
Location: United Kingdom
Posts: 13
iTrader: 0 / 0%
DJ-Craig is liked by many
Quote:
Originally Posted by costin_trifan View Post
Don't take this personally, but you must be joking me....

All you have to do is to take the code I provided above and adjust it for your needs...come on, man... (don't do just copy and paste)

Set the left and right margins for the SidebarMenuListItem to center it into the div container.
If that's not working, then set the margins to the SidebarMenuList to center it.

this is the way I position all my inner containers in the parent containers, so it should work

Cheers.
ok no need to be spoken to like that, as I said in a previous post im new to css, have been working mainly with HTML and table layouts im just learning.

thanks anyway.
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #8 (permalink)  
Old 06-14-2007, 06:20 AM
Costin Trifan's Avatar
Coding Tiger
 
Join Date: 04-13-07
Location: Romania
Posts: 3,308
iTrader: 0 / 0%
Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Send a message via Yahoo to Costin Trifan
I never ment to offend you, man!

I'm just surprised...

Cheers!
Costin
__________________

my private spice

...to be continued
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #9 (permalink)  
Old 06-14-2007, 06:59 AM
Junior Member
Latest Blog:
None

 
Join Date: 01-28-04
Location: United Kingdom
Posts: 13
iTrader: 0 / 0%
DJ-Craig is liked by many
how do you set it to centre it in the div
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #10 (permalink)  
Old 06-14-2007, 07:10 AM
Costin Trifan's Avatar
Coding Tiger
 
Join Date: 04-13-07
Location: Romania
Posts: 3,308
iTrader: 0 / 0%
Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Send a message via Yahoo to Costin Trifan
setting the "text-align: center" style attribute to the parent div
setting the "margin: 0px 5px 0px 5px; /* T R B L */" to the inner container.

you can increase or decrease the values (5px) as needed.

The second option implyies to set:
the width - should be set to auto for a best result.
__________________

my private spice

...to be continued
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #11 (permalink)  
Old 06-14-2007, 08:23 AM
Junior Member
Latest Blog:
None

 
Join Date: 01-28-04
Location: United Kingdom
Posts: 13
iTrader: 0 / 0%
DJ-Craig is liked by many
thanks for this advice, another problem solved. sorry bout my "newbie" questions im starting to learn now though!
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #12 (permalink)  
Old 06-14-2007, 10:36 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
Starting p90x today

 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,347
iTrader: 1 / 100%
Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
I wouldn't consider that a newbie question But your "newbie" question does give everyone else a refresher on questions like this.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Digg this Post!Add Post to del.icio.us
Reply With Quote
  #13 (permalink)  
Old 06-14-2007, 03:18 PM
Costin Trifan's Avatar
Coding Tiger
 
Join Date: 04-13-07
Location: Romania
Posts: 3,308
iTrader: 0 / 0%
Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
Send a message via Yahoo to Costin Trifan
I like the way it looks now, centered

You see, it wasn't so hard to do it, wasn't it?

Cheers!
__________________

my private spice

...to be continued
Digg this Post!Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image and paragraph alignment problem kade119 Coding Forum 3 03-26-2007 02:21 PM
Menu alignment problem kade119 Coding Forum 63 03-24-2007 05:55 PM
Coding: Alignment Problem in Navbar soultrader Coding Forum 0 11-17-2006 06:05 AM
Images Alignment on Page problem. HELP leeuniverse Coding Forum 2 07-12-2006 03:40 AM
CSS alignment problem blelisa Coding Forum 9 04-19-2004 05:55 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:21 PM.
© Copyright 2010 V7 Inc
Powered by vBulletin
Copyright © 2000-2010 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.