CSS - Please Help. Completely Lost.
http://energetic.bluekazoo.eu/
Hi all. Hope someone can help. The above site has a strange quirk with there being a 20px gap to the right of the image which try as I might, I cannot seem to resolve. Been looking at it so long now that I reckon I can't see the wood for the trees. All help would be gratefully appreciated. Mark. Similar TutorialsHi I have been busy for a while with this one, but I am lost here. This is what I would have to accomplish. A footer divided in three parts, left - middle - right Left part has a few icons acting as buttons, have this working! Size is static at 50px width and needed height is 23px Middle part will have a horizontal list of links centered at the middle of the window, depending of the page#.html there could be 5 till 8 links be there. Those links are two or three words width. The right part contains two input fields, also working. width 110 px. Small!? yes but both need only to contain three and five characters. Also working, except that Firefox does a little strange with the field height. But that could be me ( of course its me ), and is for later. My main problem is to get the middle part always between the left and the right part, but at the same time the content centered from the window, and when the window get smaller that the two or three words of the links are wrapping down, and not that the most right link wraps under most left link. Also that the complete footer will grow in height as necessarily. I hope that I am clear with what I try. I did search and try but then again, I am lost. Also I did have golive 1.something and did buy golive CS. It looks like that the preview is garbage, you can't trust it. None of the browsers shows what golive shows. I have more complaints, but would like to know how other people feels about this app. Any way here is what I got so far. Code: ; <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>untitled 2</title> <style type="text/css" media="screen"> <!-- .colleft { background-color: green; vertical-align: middle; position: fixed; left: 0; bottom: 0; width: 50px; height: inherit; z-index: 2; margin-right: auto; margin-bottom: inherit; margin-left: 0; padding: inherit; } .colmid{ background-color: orange; vertical-align: middle; position: fixed; left: 50px; right: 110px; bottom: 0; z-index: 2; margin-bottom: inherit; margin-left: auto; padding: inherit; } .colright { background-color: fuchsia; vertical-align: bottom; position: fixed; right: 0; bottom: 0; width: 110px; height: inherit; z-index: 2; margin-right: 0; margin-bottom: 0; padding-right: 3px; padding-left: 3px; } .footer { font-size: 12px; line-height: 95%; vertical-align: middle; position: fixed; left: 0; bottom: 0; width: 100%; height: 23px; z-index: 2; max-height: 40px; padding-right: 3px; padding-left: 3px; border-top: 3px ridge orange; display: block; } .form { font-size: 11px; background-color: blue; position: fixed; right: 0; bottom: 0; width: 110px; height: 24px; z-index: 3; margin-bottom: 0; padding-right: 5px; padding-bottom: 0; border-color: yellow; } .inputFld { font-size: 10px; background-color: yellow; position: fixed; right: 22px; bottom: 2px; width: 60px; height: 17px; z-index: 3; min-height: 18px; max-height: 16px; } a { color: blue; font-size: 11px; font-weight: bold; line-height: 95%; text-align: center; width: auto; height: auto; z-index: 3; margin-top: auto; margin-bottom: auto; padding-right: 4px; padding-left: 4px; border: solid 1px olive; display: inline-table; } table.main { position: relative; left: 0; right: 110px; bottom: 0; width: auto; height: 23px; z-index: 3; min-height: inherit; max-height: inherit; margin-right: auto; margin-left: auto; padding-right: 0; padding-left: 0; border: dashed 1px black; border-collapse: separate; border-spacing: 2px; } tbody#tBody { width: auto; height: 23px; overflow:auto; border: dotted 1px blue; } #tBody td { text-align: center; vertical-align: top; width: auto; height: auto; min-height: 23px; max-height: 40px; border: solid 1px red; } --></style> </head> <body> <div class="footer"> <div class="colleft"> <span class="threecol1">x1 x2 x3</span> </div> <div class="colmid"> <table class="main" cellspacing="0" cellpadding="0" > <tbody id="tBody"> <tr> <td> <a href="http://forums.devshed.com/" style="margin-left: 4px; margin-right: 4px; "> forums com</a></td> <td><a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">forums devshed com</a></td> <td><a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">devshed com</a></td> <td><a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">forums devshed com</a></td> <td><a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">forums devshed com</a></td> <td><a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">forums devshed com</a></td> </tr></tbody> </table> </div> <div class="colright"> <a style="margin-left: 4px; margin-right: 4px; " href="http://forums.devshed.com/">forums devshed com</a> <form class="form" action="(EmptyReference!)" method="get" name="FormName"> <input class="inputFld" type="text" name="textfieldName" value="peek" size="4"> </form> </div> </div> </body> </html> I have used some colors to show, myself where I am, so forgive me that, please. I think that the picture of the code will tell what I would like to create. BTW, My main goal was to use no table code and only f.e lists, but came and the same end. Hope that someone can help me. Thank you I'm completely stuck with my current web design. Pretty sure I'm not doing this the most efficient way, so any suggestions are helpful. My intention is to have the following: 1) an overall pg wrapper that sets width and centering 2) header 3) nav/links area 4) main content 5) footer My probs are all over the place. First, I have wrapper divs that aren't showing up. The content that is supposed to be inside these divs doesn't appear to be in them, so I guess the divs are empty. But I have no idea why this is happening. There is supposed to be a blue bg behind my links section. It's not showing up in IE6. The #main div --which should be a wrapper that contains all the thumbnails of the page -- is empty and showing up mid-way down the page behind all the thumbnails in IE6. If someone can start with these issues and help me, I would be forever grateful! XHTML is attached in a txt file and CSS is posted below. (I added the obnoxious bg colors & borders to divs intentionally to see where things are showing up.) Code: * {margin:0;padding:0} #wrapper { border: #f09 dashed 3px; background-color: yellow; text-align: left; margin: 50px auto; padding: 0; width: 810px; } #header { border: blue dashed 1px; background-color: pink; padding: 0px; margin: 5px; } #header p { display: inline; } #intro { border: 1px solid black; background-color: purple; } #intro p{ font: bold 80% arial; position: absolute; left: auto; top: 85px; color: #fff; padding: 15px 0 0 435px; margin: 0 0 25px 0; width: 350px; line-height: 1.4em; border: 1px red solid; } #nav { background-color: #09f; border: solid red 1px; min-height: 30px; } ul { float: right; list-style-type: none; margin: 10px 0; } li { font: bold 12px arial; display: inline; padding: 0 17px 0 17px; border-right: 1px solid white; } span { position:absolute; top: -100000px; } #main { border: thin green solid; padding: 25px 25px 0 25px; background-color: #eee; min-height: 1000px; } div.work { float: left; padding: 10px; /*border: thin red solid;*/ -moz-border-radius: 15px; -webkit-border-radius: 15px; background-color: white; margin: 0 0 25px 0; } div.work img { display: inline; border: 4px black solid; float: left; } div.work p { margin: 0; padding: 10px 0 0 25px; line-height: 1.3em; font: 100% arial; float: left; border: thin purple solid; width: 400px; } div.work h1 { margin: 25px 0 0 0; padding: 10px 0 0 25px; display: inline; font: 125% arial; color: #ff8529; width: 400px; float: left; border: thin green solid; } div.work h2 { display: inline; margin: 0; padding: 10px 0 0 25px; font: 85% arial; width: 400px; float: left; border: thin black solid; } Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "removed link"> <html xmlns="removed link" xml:lang="en" lang="en"> <head> <title>Page Title here</title> <link rel="stylesheet" type="text/css" href="divtest.css" media="screen"/> </head> <body> <!--begin overall page wrapper; sets width and centering--> <div id="wrapper"> <!--begin header--> <div id="header"> <p><img src="assets/logoHolder.jpg" alt="Logo alt text here" /><span>Logo description here</span></p> <div id="intro"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do ei usmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit.</p> </div> </div> <!--end header--> <!--begin nav--> <div id="nav"><ul><li><a href="#">Link 1 goes here</a></li><li><a href="#">Link 2 goes here</a></li></ul></div> <!--end nav--> <!--begin main content area--> <div id="main"> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> <div class="work"> <img src="assets/placeholder.gif" /> <h1>Heading goes here</h1> <h2>Subhead goes here</h2> <p>Supporting information goes here.</p> </div> </div> <!--end of main container--> </div> </body> </html> Please look at this page in Firefox: http://www.pacunionsonoma.com/real-estate-listings.asp?city=Santa-Rosa Notice the links up to the top area that read Showing Appointment, Listing Images, etc. No matter what I do I can't get them to appear within the respective property listing div. It must be some inheritance issue but I just can't figure it out. Thanks. I've been doing a bit of professional work for just a little while now (about a month and a half) as a summer job, but I'm just completely lost at this point and I have a clue as to how to handle this problem. Programming and styling works fine on my main computer (which has no special mods as far as I know) as well as one of my laptops (well family laptop) However, on my father's work laptop, Both macs as well as the computers for both my clients, the CSS stylesheets aren't working properly at all, almost as if certain commands from the stylesheet are ignored. On my dad's work laptop, one of my DIV tabs (the menu bar) width properties (15%) is almost completely ignored. The width of the DIV is actually extended to the point where it's pushed underneath the main content page. Changing the width value to 0 actually does nothing. I'm at a loss. On both my clients computers the main body DIV min-height value doesn't load properly, creating a small space of colour at the top of the page, while the rest of the actual content is properly placed below it. This div holds the background and "boundaries" for the nav bad and the main content. Both of which are not present. Both my father's work laptop and my clients computers use the latest version of IE.and I get these strange errors. I also get the second error when using Safari on both macs. God I love Firefox... it loads everything properly.... Either way, I'm confused as confused can be. HELP!!!! Well I trying to build a navbar and I want it to be completely in CSS so I can have it in my styling sheet and only have to edit it once when I add a new page to the navbar. I have it figured out so the formatting for it is in the CSS but the actual items and links to pages are in the HTML, and I want the format and items in the CSS. Here's my CSS for the navbar formatting: Code: #navbar ul { margin: 10px auto auto auto; padding: 6px; list-style-type: none; text-align: left; background-color: #000; font-family: arial; } #navbar ul li { display: inline; font-family: arial; } #navbar ul li a { text-decoration: none; padding: .2em 1em; color: #ffffff; background-color: #000000; font-family: arial; } #navbar ul li a:hover { color: #000000; background-color: #ffffff; font-family: arial; } And here's the code I have in the body of my HTML that adds each of the items to the navbar: Code: <div id="navbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="gallery.html">Gallery</a></li> <li><a href="irc.html">IRC</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </div> Anyone have any ideas on how I would do this? Thanks. http://loganagency.com/temp/index.php Please click there and view in IE and then in Firefox. The div is completely shifted upward and the baber overlaps the text in FF but looks fine in IE. What is wrong and how can I avoid this in the future? While we are on the subject, what gives with IE vs FF web design? Everyone posts errors here. Is there a tutorial or post that describes the reasons they process code so differently and ways to prevent it? You would need to look in Internet Explorer (probably on windows) for the bug to show up. I've posted in css, because I assume it's something to do with css, but I guess it could be something else. The stylesheet for the page can be found here... http://estore.e-av.co.uk/stylesheet.css I realise there are various other errors on these pages still, but hey, it's a work in progress. It's really weird, if you click around through the pages, about 50% of the time, a white block seems to get drawn over the left and right hand menus (actually, I'm assuming it's over everything, but behind the main content). It follows no pattern, and if you move your cursor over it, it will redraw. It's so weird, and if it was any other browser, I would ignore it - but it's i.e. on windows, the most heavily used browser out there, so I've got to fix it somehow. Has anyone come across this before and managed to fix it?? Anyone got any ideas at all?? Any advice at all would be very much appreciated. Thanks in advance... A friend of mine recently explained to me how css can be used to write webpages without use of any tables whatsoever. I was very sceptical and asked him to show/write me some examples. I immediately noticed that if you use absolute positioning you'll mess up the page presentation on differrent monitor resolutions. Also, for the same reason I found CSS to be unhandy when you have dynamically loaded content. Still, the idea to use div tags and css and abolish tables sounds very tempting, but I want to ask people with more experience than me: Should I stop using tables, is all previous functionality still available without tables, and if not, in what cases, theoretically, it is better to use css and where it is better to use tables? I've done these types of thing before myself, and the pages actually loaded faster, it was easier to edit and find things I wanted. This layout is completely table based, too much positioning for me to do. I would like the layout to preserve it's flexiblity yet still look quite the same. I need a great CSS Guru to completely CSSfy my site. This includes positioning, changing images to texts and small taggies and stuff. Since it's only one page and it'll take half hour at the most, I will pay $7 whoever asks me first. Nadalitian@VFEmail.net April 18th, 2004 I'm at a loss because I'm not very familiar with css... this page www.centerpointpilates.com/index.html has pricing formatted by line 42 of the code at the very bottom of this post, printed out here by itself: Code: #main #plans { position: relative; float: right; width: 220px; background-color: transparent; border: 1px solid #6B9D98; margin: 0px 0px 10px 10px; left: 428px; top: 29px; } I've done something but I'm unaware of what! The text within the div using this now goes off the screen, all the way to the right! Can anyone tell me why? I'm printing the whole css sheet below, the above code is line 42. If I can't figure this out tonight I'm going to just redo the page using tables until I can find what is wrong. Code: body { background-color: #F6EEC2; margin: 10px; padding: 0px; } #bannerBox { background-color: transparent; background-image: url(gfx/cpp_banner2.jpg); background-repeat: no-repeat; border: none; padding-left: 5px; height: 80px; margin: 0px; } #leftNav { position: absolute; left: 10px; top: 100px; width: 130px; background-color: transparent; } #navBlock { position: relative; left: 7px; width: 110px; background-color: transparent; border: 1px solid #6B9D98; } #main { background-color: transparent; position: relative; margin-top: 5px; margin-left: 138px; margin-right: 0px; border-left: 1px solid #6B9D98; voice-family: "\"}\""; voice-family: inherit; margin-left: 137px; margin-right: 0px; } html>body #main { margin-left: 139px; margin-right: 0px; } #main #plans { position: relative; float: right; width: 220px; background-color: transparent; border: 1px solid #6B9D98; margin: 0px 0px 10px 10px; left: 428px; top: 29px; } #tagLine { background-color: transparent; border: none; margin: 0px; padding-top: 10px; padding-bottom: 50px; } IMG { position: relative; float: right; border: 0px; padding-left: 20px; padding-top: 0px; padding-right: 10px; padding-bottom: 10px; } P,H1,H2 { margin: 0px 10px 0px 10px; } H1 { font: bold 16px "arial"; color: #6B9D98; letter-spacing: 0px; padding-left: 5px; padding-top: 3px; padding-bottom: 10px; } H2 { font: bold 14px "arial"; color: #6B9D98; letter-spacing: 0px; padding-top: 10px; padding-bottom: 13px; } #leftNav P { padding-top: 6px; margin: 0px 10px 0px 10px; } #leftNav P.spacer { padding-bottom: 15px; } #navBlock P { font: bold 11px arial; color: #6B9D98; padding-top: 1px; padding-bottom: 1px; } #main P { text-align: justify; font: 11px arial; color: #6B9D98; line-height: 17px; padding-left: 10px; padding-bottom: 10px; } #main P.head { font: bold 12px arial; color: #6B9D98; padding-left: 10px; padding-bottom: 3px; } #plans P { font: 12px "arial"; color: #6B9D98; padding-left: 10px; padding-bottom: 3px; } #plans P.list { text-align: justify; font: bold 10px arial; color: #6B9D98; width: 150px; padding-left: 15px; padding-bottom: 5px; } #plans P.list2 { text-align: justify; font: bold 10px arial; color: #6B9D98; width: 180px; padding-left: 15px; padding-bottom: 5px; } #plans P.price { font: 11px arial; color: #6B9D98; padding-left: 15px; padding-bottom: 1px; } #tagLine P { font: italic 11px arial; color: #6B9D98; padding-bottom: 3px; } #tagLine P.copy { font:11px "lucida console"; color: #6B9D98; padding-top: 5px; } A.nav:link { text-decoration: none; background-color: transparent; color: #6B9D98; font: bold 11px arial; } A.nav:visited { text-decoration: none; background color: transparent; color: #6B9D98; font: bold 11px arial; } A.nav:hover { text-decoration: none; background-color: transparent; color: #6B9D98; font: bold 11px arial; } A.reg:link { text-decoration: none; background-color: transparent; color: #6B9D98; border-bottom: 1px solid #8DBFBA; } A.reg:visited { text-decoration: none; background-color: transparent; color: #8DBFBA; border-bottom: 1px solid #8DBFBA; } A.reg:hover { text-decoration: none; background-color: transparent; color: #8DBFBA; border-bottom: none; } Hi all, I use an background image for a menu. Code: #menu a, #menu a:hover { height: 20px; width: 150px; text-decoration: none; padding-left: 40px; padding-top: 3px; padding-right: 3px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 11px; margin-bottom: 10px; background-position: 0px; vertical-align: middle; } #menu a { color: #9E007F; background-image: url(../imgs/nav/subNav/subNav_bg.gif); background-repeat: no-repeat; } #menu a:hover { color: #FFF; background-image: url(../imgs/nav/subNav/subNav_bg_over.gif); background-repeat: no-repeat; } It works fine in IE but not in firefox. Somehow the background image is not completely shown. It stops after the last letter. Any suggestions?? Grtz, Hi, I am quite familiar with css - have a few books on the subject but always struggle when trying to work with a design of my own. I guess where I struggle is in what to do first ... how do I work ... my work flow. I always seem to get part of it right but then as I go further ... I find that my next step might undo my previous ... so I end up with a maze or positioning problems etc. I struggle with getting everything positioned properly ... not sure why. I was hoping someone could start me off in the right direction ... you a what to do first series of steps ... or maybe a workflow from someone more exprienced in the design area of things - I'm more of a backend kinda guy. Really anything would help ... Thanks hey guys, I got a interesting situation here. I'm building this site... http://www.peelautoradio.com/source/start.php The problem is, I've attempted to pickup the style sheets from an external file (site.css). Everything works fine, however, if you click on a link (that isn't complete) or refresh the page too many times - the styles are lost. here's the css tags. (I'm using include "site.css" in my php now). Code: <style> body { margin: 0px; font-family: Verdana,sans-serif; color: #333333; line-height: 1.166; margin: 0px; padding: 0px; background: #FFFFFF; } #topcell { position: relative; top: 0px; left: 0px; margin: 10px; width: 750px; height: 250px; background-color: transparent; overflow: auto; vertical-align: justify; } #botcell { position: relative; margin: 10px; top: 0px; left: 0px; width: 700px; height: 250px; background-color: transparent; overflow: auto; vertical-align: justify; } #topMenuLinks { position: relative; top: 2px; left: 5px; width: 548px; height: 20px; margin: 0px; padding: 3px 9px 2px 2px; } #topMenuLinks a:link, #menuLinks a:visited { display: inline; color: #DCE8FF; border-left: 4px solid #97163D; border-right: 1px solid #CB8A9E; font-size: 10pt; font-weight: bold; padding: 3px 20px 3px 10px; background-color: transparent; text-decoration: none; } #topMenuLinks a:hover { display: inline; color: #DCE8FF; border-left: 4px solid #FFDBE7; border-right: 1px solid #FFFFFF; font-size: 10pt; font-weight: bold; padding: 3px 20px 3px 10px; background-color: #EC7A9D; text-decoration: none; } #botMenuLinks { position: relative; top: 2px; left: 170px; width: 548px; height: 20px; margin: 0px; padding: 3px 9px 2px 2px; } #botMenuLinks a:link, #menuLinks a:visited { display: inline; color: #DCE8FF; border-left: 4px solid #97163D; border-right: 1px solid #CB8A9E; font-size: 10pt; font-weight: bold; padding: 3px 20px 3px 10px; background-color: transparent; text-decoration: none; } #botMenuLinks a:hover { display: inline; color: #DCE8FF; border-left: 4px solid #FFDBE7; border-right: 1px solid #FFFFFF; font-size: 10pt; font-weight: bold; padding: 3px 20px 3px 10px; background-color: #EC7A9D; text-decoration: none; } </style> Any ideas? I have built two sites using a copy of the style sheet from site1 to build the site2. The stylesheets are basically the same accept for a few images and colors. I named each file with unique filenames. I am developing these on a new hosting account and have not yet transferred the dns so my urls are http://myip/~site1, ...site2. While viewing site 1... if I go to site 2, it acts as if it cannot see the stylesheet. If I close my browser and reopen site 2, everything is fine. However now when I try to go to site 1 the same thing happens. Is this because they are both coming from the same ip address or something??? That's all I can figure. Thanks for any help! Sometimes, what seems really easy, gets lost in a pile of similar code and confuses me. All I'm trying to do is to increase the width ofsome drop down menus, and I just can't find the code that determines it. Here's the page with the yellow (#fcc613) drop downs and here is the CSS Appreciate any help on this. Thanks Please refer to the web site: h*t*t*p://alturl.com/yhba Please look at the web site mentioned above and pay close attention to the "|" dividing the menu links (About, Events, Teams, Shop). Problem: This "|" should not appear at the end of the menu (after the "Shop" link). However it seems that it is showing up in the Windows Firefox & Safari but not in Firefox when being run under the Apple operating system. Please see if it is visible for you and if so, pleassee suggest how I may go about fixing the issue. HTML: Code: <div id="navigation"> <a href="/about" class="navigation-about">About</a> <a href="/events" class="navigation-events">Events</a> <a href="/teams" class="navigation-teams">Teams</a> <a href="/shop" class="navigation-shop last">Shop</a> </div> CSS: Code: #navigation { background:url(../_images/menu_bg.png) repeat-x; height:68px; width:100%; padding:10px 0 10px 0; margin:0 0 20px 0; } /*#navigation a { color:#666; padding: 0 10px 0 10px; text-decoration:none; }*/ .navigation-about, .navigation-events, .navigation-teams, .navigation-shop { float: left; display: block; padding: 0 0 0 12px; font-size: 105%; } #navigation a.last{ background-image: url(); } #navigation-logo { display:block; float:left; margin:3px 0 0 10px; padding-right:25px; } #navigation a, #navigation a:visited { display:block; text-decoration:none; color:#666; padding:0 10px 0 10px; background-image:url(../_images/nav_divider.png); background-repeat:no-repeat; background-position:right; font-weight:bold; } Thank you! I moved internal css to an external file and then linked the page to that file and lost my hand cursor on links. How do i get it back. Right now the arrow cursor remains when links are rolled over. Can be viewed at. kopertone.com/newsite/index1.html Also, in fire fox, I want dotted lines under my text links when rolled over, but not image links; how do I remove the dotted lines under my image links? Thanks! APPEARS TO BE HASLAYOUT ISSUE IMAGE WITHIN ANCHOR NOT CLICKABLE. Hi Guys looking for a spot of help please. IE is driving me up the wall. Ive wrote a jQuery script for scrolling a list horizontally upon user clicking left or right. The list has anchors within it which are blocks which I want to be clickable with an image inside (fine in FF etc) but in IE the image within the anchor loses its ability to be clicked the rest if fine apart from I manually have to set the cursor to pointer to show the user its clickable still. Just when they click the item image within the anchor it does nothing. Here is a slim version of the HTML : Code: <ul> <li><a href="/page1.html"><span class="box_wrap"><span class="img"><img src="1.jpg" border="0" height="75" /></span><span>Item 1</span></span></a></li> <li><a href="/page2.html"><span class="box_wrap"><span class="img"><img src="2.jpg" border="0" height="75" /></span><span>Item 2</span></span></a></li> <li><a href="/page3.html"><span class="box_wrap"><span class="img"><img src="3.jpg" border="0" height="75" /></span><span>Item 3</span></span></a></li> <li><a href="/page4.html"><span class="box_wrap"><span class="img"><img src="4.jpg" border="0" height="75" /></span><span>Item 4</span></span></a></li> <li><a href="/page5.html"><span class="box_wrap"><span class="img"><img src="5.jpg" border="0" height="75" /></span><span>Item 5</span></span></a></li> <li><a href="/page6.html"><span class="box_wrap"><span class="img"><img src="6.jpg" border="0" height="75" /></span><span>Item 6</span></span></a></li> <li><a href="/page7.html"><span class="box_wrap"><span class="img"><img src="7.jpg" border="0" height="75" /></span><span>Item 7</span></span></a></li> <li><a href="/page8.html"><span class="box_wrap"><span class="img"><img src="8.jpg" border="0" height="75" /></span><span>Item 8</span></span></a></li> <li><a href="/page9.html"><span class="box_wrap"><span class="img"><img src="9.jpg" border="0" height="75" /></span><span>Item 9</span></span></a></li> <li><a href="/page10.html"><span class="box_wrap"><span class="img"><img src="10.jpg" border="0" height="75" /></span><span>Item 10</span></span></a></li> <li><a href="/page11.html"><span class="box_wrap"><span class="img"><img src="11.jpg" border="0" height="75" /></span><span>Item 11</span></span></a></li> <li><a href="/page12.html"><span class="box_wrap"><span class="img"><img src="12.jpg" border="0" height="75" /></span><span>Item 12</span></span></a></li> <li><a href="/page13.html"><span class="box_wrap"><span class="img"><img src="13.jpg" border="0" height="75" /></span><span>Item 13</span></span></a></li> <li><a href="/page14.html"><span class="box_wrap"><span class="img"><img src="14.jpg" border="0" height="75" /></span><span>Item 14</span></span></a></li> </ul> CSS Code: Code: ul { width: 9999px; list-style-image:none; list-style-position:outside; list-style-type:none; margin:0; padding:0; position: absolute; top: 0; } ul li { display:block; list-style:none; margin:0; padding:0; border:0; text-align:center; float:left; width:118px; height:133px; } ul li a{ display:block; border-right:1px solid #e2f5fe; outline:none; text-decoration:none; background:#FFF; padding:3px 2px 3px 2px; line-height:15px; } ul li a:hover{ background:#e2f5fe; color:#fe0084; } ul li span.box_wrap { display:block; background:#FFF; height:127px; } ul li span.box_wrap span{ padding:0px 3px; font-size:12px; } ul li span.img { padding:2px 0px 2px 0px; display:block; } Just when you try to click any of the images within the boxes its not clickable. Really stumped. Any help or pointers would be greatly appreciated. Thanks in advance! I have a menu bar made up of <a href> elements that have a hover style of:
PHP Code: #mainMenu a:hover { color:#000000; background-color: #66c74c; padding: 1px 4px 1px 4px; margin: 1px 1px 1px 1px; } This will provide a green colored rollover visual as the user moves their mouse over the menu bar. I just added some JS today that will highlight the clicked (selected) menu so there is visual feedback of the section the user is in. For some reason, after setting the background color of the <a href> and color attributes, the HOVER: no longer functions. Here is the code to do the hilite where I pass the ID of the <a href> menu selection in the variable "menu": PHP Code: //--- Simplify setup by creating an array of the menus and hilight ID's --- var menus = ["menu1","menu2","menu3","menu4","menu5", "menu6","menu7","menu8","menu9","menu10"]; function J_hiliteMenu(menu) { //--- first make sure all the menu are hidden and unhilited --- for(i=0; i < menus.length; i++) { if (menus[i] == menu) theIndex = i; // Hold on to the chosen index position var obj = document.getElementById(menus[i]); if (obj == null) continue; // if menu is not available skip it obj.style.color = "#ffffff"; obj.style.backgroundColor = "#234fd7"; } //--- hilite the menu we're interested in --- var obj = document.getElementById(menu); obj.style.color = "#000000"; obj.style.backgroundColor = "#f8f400"; } Prior to hiliting the menu I un-hilite all the menus (since we may be switching from another). I think this is where the problem is. Maybe I need to redefine the rollover "hover" attribute for all elements during the un-hilite loop? Does anyone know how to set a HOVER: attribute using JavaScript? Thanks! |