Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 17th, 2006, 01:08 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default IE not displaying padding properly :-(

hello,
i am a CSS noob (n00b?) and cannot figure out why IE (v6) is not displaying my padding correctly.
i have been using css for about 2 weeks and want to develop a menu that has padding on the <a> links in a list so that when i use background-color on that, the field will turn a different color when somebody hovers over whatever link.

here is what the menu looks like when i hover above one of the links:
in Firefox:
http://img176.imageshack.us/img176/3774/inffbq9.jpg

in IE 6:
http://img95.imageshack.us/img95/1148/inieua0.jpg

here is the code of the page. (i have not included the content and stuff, this is just the top).

Quote:
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" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>TITLEofPAGE</title>

<style type="text/css">

body {
    width: 1007px;
    background-color: #FFF;
    font-family: Arial, Verdana, Helvetica, sans-serif;
    font-size: 12px; color: #000;
    }

* {padding: 0; margin: 0;} /* This effects all things, use after body selector */

/* START ----------------- top + menu */

#top {width: 1007px; display: inline;}

#top1-left {
    margin: 0; padding: 0;
    background-image: url(images/top-left.jpg);
    background-repeat: no-repeat;
    width: 566px; height: 131px;
    float: left;
    }
#top1-right {
    margin: 0; padding: 0;
    background-image: url(images/top-right.jpg);
    background-repeat: no-repeat;
    width: 441px; height: 131px;
    float: right;
    }

#menu {width: 1007px; display: inline;}

#menu-left {
    margin: 0; padding: 0;
    background-image: url(images/menu-bar.gif);
    background-repeat: no-repeat;
    width: 871px; height: 30px;
    float: left;
    }

#menu-right {
    margin: 0; padding: 0;
    background-image: url(images/menu-end.gif);
    background-repeat: no-repeat;
    width: 136px; height: 30px;
    float: right;
    }
/* END ----------------- top + menu */

#menutxt {position: absolute; top: 138px; left: 1px;}

#menutxt ul.menu {
    text-transform: capitalize;
}

#menutxt ul.menu li {
    list-style: none;
    display: inline;
}

#menutxt ul.menu a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    padding: 4px 18px 7px 18px;

}

#menutxt ul.menu a:hover {
    color: #fff;
    background-color: #2F6197;
}

</style>
</head>
<body>

<div id="top">
    <div id="top1">
        <div id="top1-left"></div>
        <div id="top1-right"></div>
    </div>
</div>

<div id="menu">
    <div id="menu1">
        <div id="menu-left"></div>
        <div id="menu-right"></div>
    </div>
</div>

<div id="menutxt">
    <ul class="menu">
        <li><a href="#">home</a></li>
        <li><a href="#">link1</a></li>
        <li><a href="#">link2</a></li>
        <li><a href="#">link3</a></li>
        <li><a href="#">link4</a></li>
    </ul>
</div>
</body>
</html>
i would really like IE to display the blue background the same way Firefox does. it is smaller in IE and i dont know why.
i would really appreciate any help, i know it can take a while looking over the code and whatnot, but i am stuck otherwise

thank you very much in advance :)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Padding Zeros jmss66 Classic ASP Basics 5 January 28th, 2008 07:38 PM
Image not displaying properly but I path correct DrGonzo XSLT 1 January 22nd, 2007 05:14 AM
"Padding" a value in XSL francislang XSLT 1 September 3rd, 2004 07:56 AM
padding problem anshul HTML Code Clinic 5 July 24th, 2004 11:11 PM



All times are GMT -4. The time now is 07:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.