HTML - (resolved) Syntax Error, Unexpected T_string
Parse error: syntax error, unexpected T_STRING in /home6/comparea/public_html/search.php on line 340
Partnered up with a buddy to build the website compareacollege.com, he bailed out, unfortunately i know very little about web design, site was fine though, until host made me change password, then the search wouldnt work, the above is the error i was getting, i went into into every page and updated password, actually fixed it about half way through except a little coding was showing up on search page, after i updated every password that error is all that showed up on search, now several months later the page doesnt even show up at all, like its a bad link, not sure what do, hopefully you guys can help me out, hopefully an easy fix Similar TutorialsHi folks, I've got an error saying: Parse error: syntax error, unexpected T_STRING in /home/a2387326/public_html/index.html on line 1 Here's my code: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="refresh" content="0;url= HOME.html" /></head><body></body></html> I used iWeb to build my website, and I've uploaded it to a web host which is different to the domain registrar - I don't know if that makes a difference, but I believe I've set up the DNS stuff correctly anyway... This is driving me crazy - if anyone could help, I'd MASSIVELY appreciate it! Thanks, bloowy Code: Parse error: syntax error, unexpected T_DNUMBER in /home/a6989956/public_html/include/database.php on line 24 Can anyone please tell me whats wrong? Here is line a few lines Code: class MySQLDB { var $connection; //The MySQL database connection var $num_active_users; //Number of active users viewing site var $num_active_guests; //Number of active guests viewing site var $num_members; //Number of signed-up users /* Note: call getNumMembers() to access $num_members! */ /* Class constructor */ function MySQLDB(){ /* Make connection to database */ $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); /** * Only query database to find out number of members * when getNumMembers() is called for the first time, * until then, default value set. */ $this->num_members = -1; if(TRACK_VISITORS){ /* Calculate number of users at site */ $this->calcNumActiveUsers(); /* Calculate number of guests at site */ $this->calcNumActiveGuests(); } } line 24-25 is Code: $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); PLEASE HELP! I've a Syntax error with the following code, any helpwould be grateful <div class="menuBar c2"><a class="menuButton" href="" onclick="return buttonClick(event, 'lifesavingmenu');" onmouseover="buttonMouseover(event, 'lifesavingmenu');">Lifesaving<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'mnoticesmenu');" onmouseover="buttonMouseover(event, 'mnoticesmenu');">"M" Notices<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'stabilitymenu');" onmouseover="buttonMouseover(event, 'stabilitymenu');">Stability<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'radarmenu');" onmouseover="buttonMouseover(event, 'radarMenu');">Radar<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'merchantnavymenu');" onmouseover="buttonMouseover(event, 'merchantnavymenu');">Merchant Navy<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'alterationsmenu');" onmouseover="buttonMouseover(event, 'alterationsmenu');">Alterations<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'lightrecognitionmenu');" onmouseover="buttonMouseover(event, 'lightrecognitionmenu');">Light Recognition<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'checklistsmenu');" onmouseover="buttonMouseover(event, 'checklistsmenu');">Checklists<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'chartworkmenu');" onmouseover="buttonMouseover(event, 'chartworkmenu');">Chartwork<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'situationsmenu');" onmouseover="buttonMouseover(event, 'situationsmenu');">Situations<\/a> <a class="menuButton" href="" onclick="return buttonClick(event, 'photogallerymenu');" onmouseover="buttonMouseover(event, 'alterationsmenu');">Photo Gallery<\/a><\/div> I recently came accross this code with an error on the line itself: function removeWaterMark(e) { var h1s = document.getElementById("window","table","display","notebook","cable","keyboard","iphone","trackball ","tablet", "tc","iphone","postit","remote","speakers","keyboard","cds","printer","foto","papers","cafe","bin"," plant","carpet","chair","sofa","sofa2","wardobe","papers2", "png_carpet","png_cd","png_chair","png_comp","png_cup","png_headphones","png_iphone","png_keyboard", "png_papers","png_passport","png_plant","png_postit","png_regal","png_sheet","png_sheet","png_table" ,"png_tc","png_trackball","png_window")[0].style; if (h1s) { if ((h1s.visibility == "visible") || (h1s.visibility == "")) { h1s.visibility = "hidden"; } else { h1s.visibility = "visible"; } } (e.preventDefault) ? e.preventDefault() : (e.returnValue = false); } Can you tell me what exactly is the problem here? Here is a link to a Screenshot I basically have some free code I found online for creating an overlay that reacts to javascript. It contains a quick time plugin and streams video when the user clicks a link. This is the code exactly as I received it and functions great. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #displaybox { z-index: 10000; filter: alpha(opacity=50); /*older IE*/ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); /* IE */ -moz-opacity: .50; /*older Mozilla*/ -khtml-opacity: 0.5; /*older Safari*/ opacity: 0.5; /*supported by current Mozilla, Safari, and Opera*/ background-color:#000000; position:fixed; top:0px; left:0px; width:100%; height:100%; color:#FFFFFF; text-align:center; vertical-align:middle; } </style> <script> function clicker(){ var thediv=document.getElementById('displaybox'); if(thediv.style.display == "none"){ thediv.style.display = ""; thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' width='640' height='500'><param name='src' value='http://cowcast.creativecow.net/after_effects/episodes/Shape_Tips_1_POD.mp4'><param name='bgcolor' value='#000000'><embed src='http://cowcast.creativecow.net/after_effects/episodes/Shape_Tips_1_POD.mp4' autoplay='true' pluginspage='http://www.apple.com/quicktime/download/' height='500' width='640' bgcolor='#000000'></embed></object><br><br><a href='#' onclick='return clicker();'>CLOSE WINDOW</a></td></tr></table>"; }else{ thediv.style.display = "none"; thediv.innerHTML = ''; } return false; } </script> </head> <body> <div id="displaybox" style="display: none;"></div> <a href='#' onclick='return clicker();'>Open Window</a> </body> But bugging/stuttering and browser incompatibility has made me want it to be a .swf file instead. So now I have a very basic flash object that plays my movie, splash.swf. Here is the code and it too functions perfectly: Code: <object width="640" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/ pub/shockwave/cabs/flash/swflash.cab"> <param name="SRC" value="splash.swf"> <embed src="splash.swf" width="640" height="480"></embed> </object> So now I have two independently working bits of code - one which opens the transparent overlay and plays a video using a quicktime object, and another that is simply a flash object to replace that quicktime object. So what I've done is replaced everything in between the [object]..[/object] in the first code with everything in between the [object]..[/object] in the second code, producing the following new code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <style> #displaybox { z-index: 10000; filter: alpha(opacity=50); /*older IE*/ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); /* IE */ -moz-opacity: .50; /*older Mozilla*/ -khtml-opacity: 0.5; /*older Safari*/ opacity: 0.5; /*supported by current Mozilla, Safari, and Opera*/ background-color:#000000; position:fixed; top:0px; left:0px; width:100%; height:100%; color:#FFFFFF; text-align:center; vertical-align:middle; } </style> <script> function clicker(){ var thediv=document.getElementById('displaybox'); if(thediv.style.display == "none"){ thediv.style.display = ""; thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><object width="640" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/ pub/shockwave/cabs/flash/swflash.cab"> <param name="SRC" value="splash.swf"> <embed src="splash.swf" width="640" height="480"></embed> </object><br><br><a href='#' onclick='return clicker();'>CLOSE WINDOW</a></td></tr></table>"; }else{ thediv.style.display = "none"; thediv.innerHTML = ''; } return false; } </script> </head> <body> <div id="displaybox" style="display: none;"></div> <a href='#' onclick='return clicker();'>Open Window</a> </body> But what is this? By replacing the working quicktime object with the working flash object, Dreamweaver produces a syntax error that wasn't there before, and breaks the entire script. Clearly the script is referencing something within the tags that I am replacing, although it's not clear to me what. thanks for helping me Hi! I was wondering whether someone could enlighten me (or do it for me), as to how I use URL Parameters. I don't understand javascript, or much html for that matter. I have a page, 'http://goldenlightsoft.org'. I want to set it up so if someone types in 'http://goldenlightsoft.org/index.htm?page=downloads.htm', they would see the normal page, except that the iFrame in the middle ('I1'), would be pointing to downloads.htm of the site, not the normal home.html. I would prefer this system to work without compatibility issues with other browsers, and also I am not sure of the hosts capabilities. I know html and javascript work fine. Can someone help me with this? Thanks, dawmail333 Someone on another forum figured it out for me, thanks, please delete this. When the hotspots on my image map are moused over a box of text appears. I need a word (close, in this case) to give the impression of a link, i.e I need the finger pointer to appear. I have written an onClick script that will close the box of text when this "phantom link" is clicked. Any help? I was able to resolve this on my own! Thanks for reading. ok im trying to get the frames to work on my index page. and they are showing up perfectly when i load the page but when i click one of my links to another page instead of the second column changing to that page, the table of contents column does. Quote: <HTML> <HEAD> <TITLE>World of Warcraft Obsession</TITLE> </HEAD> <!Create two columnwise frames> <Frameset COLS="140,*"> <!define left frame> <FRAME NAME=TOC SRC=TOC.html MARGINWIDTH="5" MARGINHEIGHT="5" SCROLLING=YES> <!define right frame> <FRAME NAME=MAIN SRC=main.html MARGINWIDTH="10" MARGINHEIGHT="10" SCROLLING=YES> </Frameset> </HTML> Hello I have an issue with a rollover on my page. I'm building a website for AS level media coursework and need help with a code. The rollover is part of a table and is aimed to play music when the mouse hovers over it, while at the same time switching the image to another... The code for the rollover itself is: Code: <a href="#" onMouseOut="MM_swapImgRestore()""stopSound(0);" onMouseOver="MM_swapImage('Image9','','piece1.jpg',1)""playSound(0);"><img src="piece1hit.jpg" name="Image9" width="156" height="156" border="0"></a> The bad javascript for the image swap is: Code: <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> And finally the even worse coding for the sound is: Code: <SCRIPT LANGUAGE="JavaScript"><!-- var aySound = new Array(); aySound[0] = "Kylie.mp3"; aySound[1] = "fseven.mp3"; IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0; NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0; ver4 = IE||NS? 1:0; onload=auPreload; function auPreload() { if (!ver4) return; if (NS) auEmb = new Layer(0,window); else { Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>"; document.body.insertAdjacentHTML("BeforeEnd",Str); } var Str = ''; for (i=0;i<aySound.length;i++) Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>" if (IE) auEmb.innerHTML = Str; else { auEmb.document.open(); auEmb.document.write(Str); auEmb.document.close(); } auCon = IE? document.all.auIEContainer:auEmb; auCon.control = auCtrl; } function auCtrl(whSound,play) { if (IE) this.src = play? aySound[whSound]:''; else eval("this.document.embeds[whSound]." + (play? "play()":"stop()")) } function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); } function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); } //--></SCRIPT> I hope someone can resolve my issue for me, for I'm absolutely stumpted by this. I have very limited expertise in coding (as you can see) and would greatly appreciate any help I can recieve. Thank you for your time. I have a problem on my forum, in the home page, the forum list is made up of a grid, but the spacing inbetween each spot is too big and therefore it looks kind of stupid. Any ideas? Heres the site http://techoftheweekpodcast.com/index.php So i decided the other day to redo my website. I hopped on to Notepad++ and got the home page done. However, when i went to test it, all i got were the top four links. Can anyone spot any errors, or tell me why it isn't working? Thanks <html> <body> <style type="text/css"> b { background-color:black; text-color:green; } p { text-color:red; } </style> <a href="home.htm">Home</a> <a href="blogish.htm>Blogish</a> <a href="links.htm">Links</a> <a href="currentguns.htm>Currunt Guns</a> <br/> <br/> <br/> <br/> <br/> Hello, welcome to my extreamly lame webpage... <br/> <br/> Here i will tell you what guns i currently have, and equiptment for them (hoppers, tanks, tank covers, upgrades, etc.). <br/> I will also have a mini blog were i will post updates after every major event at Hell Survivors Inc. I will also put up my war stories. <br/> <br/> <br/> <br/> <br/> <p> WARNING!!! DO NOT PLAY PAINTBALL, You WILL be addicted immediatly, and won't be able to stop. It will drain your funds, and you will <br/> come home every day bleeding and in pain. <br/> <br/> <br/> In other words, its a good thing pballers are crazy and think that the pain is fun, and can go for weeks without eating so they <br/> can afford there 1200 dollar markers... </p> <br/> <br/> <a href="home.htm">Back to Top</a> </body> </html> can you detect if a page is a child? (in an iframe) if (page is a child) { parent.remoteClick('myButton'); } else { } thanks. or the opposite i suppose... if (page is a parent) { } else { parent.remoteClick('myButton'); } Hi Everyone, hoping someone can help me here, i'm totally new to html. i work in digital advertising and project manage web development, but i don't know how to troubleshoot html problems, particularly across browsers. The website in question is www.forbetterorpurse.com I built it using the sitebuilder provided by the hosting company. I have two problems (that i know of anyway haha!) 1. The table to the left has somehow increased in width. I don't think I altered anything but no doubt it's something small 2. if you compare the site from IE to Firefox, the background of part of the content area is yellow compared with grey. It's supposed to be grey. if anyone has any ideas or can point me in the right direction, it'd be greatly appreciated! Thanks Hi, I'm trying to debug some code and, in spite of running it cleanly through the W3C validator, still have some big issues. The site runs fine in Chrome but displays incorrectly in IE and FireFox. You can see the site at www.iwailingwall.com Firefox is giving the following error: Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsBlocklistService.js :: anonymous :: line 548" data: no] Source File: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsBlocklistService.js Line: 548 IE is not showing any errors. I would really appreciate any help on the display issue as well as a pointer to browser-specific code validators if they exist. Thanks in advance for any help you can provide. Please let me know if I can provide any additional information to assist in a diagnosis. The problematic code is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>The Wailing Wall</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ --> <script type="text/javascript" src="swfobject.js" /> <style type="text/css"> textarea#styled { width: 600px; height: 120px; border: 3px solid #cccccc; padding: 5px; font-family: Tahoma, sans-serif; background-color: rgb(255,255,204); background-position: bottom right; background-repeat: no-repeat; } body { padding: 20px; background-color: rgb(238, 238, 238); font-family: Calibri; font-size: larger; color: rgb(255, 255, 204); font-weight: bolder; text-align: center; } </style> </head> <body style="background-image: url(HortonRockWall2.jpg);text-align:center;"> <table align="center"> <tr> <td> </td> <td align="left" > <font size="8" />The Wailing Wall <br /> <font size="4" />Tuck your worries here, snug among all our worries. <br />We'll keep them safe so you can let them go. </td> <td> </td> </tr> <tr> <td> </td> <td><table><tr><td> <div id="flashcontent">This will be shown to users with no Flash or Javascript.</div> <script type="text/javascript"> var myWidth = 0, myHeight = 0; var maxHeight = 0; myWidth = 600; myHeight = 600; if (myWidth > myHeight) maxHeight = .75* myHeight; else maxHeight = .75* myWidth; var so = new SWFObject("tagcloud.swf", "tagcloud", maxHeight, maxHeight, "7", "#000000"); // uncomment next line to enable transparency so.addParam("wmode", "transparent"); so.addVariable("tcolor", "0xFFFFCC"); so.addVariable("mode", "tags"); so.addVariable("distr", "true"); so.addVariable("tspeed", "60"); so.addVariable("tagcloud", "%3Ctags%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D98%27+style%3D%2710%27%3EAdd+to+the+wall+here....%3C%2 Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D97%27+style%3D%2710%27%3EAdd+to+the+wall+here....%3C%2Fa%3E% 3Ca+href%3D%27%2Findex.php%3Fid%3D96%27+style%3D%2710%27%3EI+hate+meetings+about+meetings...%3C%2Fa% 3E%3Ca+href%3D%27%2Findex.php%3Fid%3D94%27+style%3D%2710%27%3EI+am+worried+that+the+recessio...%3C%2 Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D84%27+style%3D%2710%27%3EI+think+that+this+is+a+really+...%3 C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D75%27+style%3D%2710%27%3EI+often+worry+that+I+am+a+****.. .%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D74%27+style%3D%2710%27%3EI+worry+that+I%27ve+spent+4+y ea...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D73%27+style%3D%2710%27%3EI+worry+that+my+son+is+in heren...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D72%27+style%3D%2710%27%3EOne+worry+I+have+is+th at+someo...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D71%27+style%3D%2710%27%3EI+am+worried+about+ the+possibi...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D70%27+style%3D%2710%27%3EWhen+this+electi on+is+over%2C+I+...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D69%27+style%3D%2710%27%3EI+am+worrie d+about+what+I+am+g...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D68%27+style%3D%2710%27%3EIt%27s+f all+again+and+the+weath...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D67%27+style%3D%2710%27%3EI%27 m+worried+about+what%27s+goi...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D66%27+style%3D%2710%27%3 EHopefully+this+isn%27t+meta-ana...%3C%2Fa%3E%26nbsp%3B%26nbsp%3B+%3Ca+href%3D%27%2Findex.php%3Fpage%3D2%27+style%3D%2710%27%3ENe xt%3C%2Fa%3E++%3Ca+href%3D%27%2Findex.php%3Fpage%3D2%27+style%3D%2710%27%3ELast+Page%3C%2Fa%3E+%3Ca+ href%3D%27%2Findex.php%27+style+%3D%2710%27%3EReturn+to+main+page.%3C%2Fa%3E%3C%2Ftags%3E");so.write ("flashcontent"); </script> </td></tr> <tr><td align="center"> <font size='2' />Based on WP-Cumulus by <a href="http://www.roytanck.com/">Roy Tanck</a></td></tr> </table></td> <td valign='top'> <table style="width: 407px; margin-left: 30px; border-width:3;"> <tr> <td style="width: 383px;"> <form action='/index.php' method='post' name='contact_form' /> <textarea name="body" rows="5" cols="40">Add to the wall here.</textarea> </td> </tr> <tr> <td style="width: 383px;"><font size="3" />By: <input name="name" value="Anonymous" type="text" /><input value="Submit" name="Submit" type="submit" /><input value="Reset" name="Reset" type="reset" /> </td> </tr> <tr> <td style="width: 383px;"> <input name='reference' type='hidden' value='0' />What do you need to let go of? </td> </tr> </table> </td> </tr> </table> </body> </html> I need my css menu to stay on top of everything, but there is a .swf with a javascript code that I am using for a slideshow that won't stay under the menu. Any solutions? - THANK YOU! Here's the test page: http://dbk.me/test/intro.html RESOLVED! - Used variable: so.addParam("wmode", "transparent"); Thanks for your help! So I'm doing a website with horizontal menu that is centered. The page is 100% width, and the menu can be with or without fixed width. The menu is fine otherwise, but the sub items are not next to each other. This is because they only align the width of their parent. However, I'd like them to be centered under their parent regardless of how many sub items there are (so ultimately they could be as wide as the whole menu, provided there were enough sub items). So in the code I now have, the 3 sub items align so that 2 are inline, and the 3rd is under them. These should be inline, stretching over the width of their parent's width. Thanks for the help! Code: <body> <div id="banner"> <div id="centeredmenu"> <ul> <li><a href="#">Item 1</a></li> <li><a href="#">Item with Sub</a> <ul> <li><a href="#">Sub Item 1</a></li> <li><a href="#">Sub 2</a></li> <li><a href="#">Long Sub Item 3</a></li> </ul> </li> <li><a href="#">Menu Item 3</a></li> </ul> </div> </div> </body> </html> Code: #banner { position: absolute; width: 100%; height: 100px; top: 0; } #centeredmenu { height: 55px; float:left; width:100%; overflow:hidden; position:relative; top: 0px; } #centeredmenu ul { float:left; clear: both; list-style:none; margin:0; padding:0; position: relative; left:50%; text-align:center; } #centeredmenu li { width: 180px; display:block; float:left; list-style:none; margin:0; padding:0; position:relative; right:50%; } #centeredmenu a { display:block; margin:0 0 0 0px; padding:0px 10px; background:#C03; color:#fff; text-decoration:none; } #centeredmenu ul ul { position: absolute; width: 100%; display: none; z-index: 400; } #centeredmenu ul ul li { position: relative; width: 50%; z-index: 500; } #centeredmenu ul li a:hover { background: #C03; color: #3FF; } #centeredmenu ul li:hover ul{ display: block; } Ok, this is the strangest quirk I think I have seen in IE. It seems that when I combine a right-aligned TD with a UL in the following row in a TD with a colspan of "2", where the content of the right-aligned TD is a word with no spaces, IE goes into spasms. In Opera, Google Chrome, Firefox, and Safari, all is well. Yet in IE, right-padding seems to get automatically added to the right-aligned TD. If I either remove the UL, get rid of the first column in the first row, or break up the long word, it displays fine. Yet, if all those things remain in place, IE just doesn't seem to be able to get its act together. Anyone? Here is my code: HTML Code: <?xml version="1.0" encoding="UTF-8"?> <!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" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <head> <title>Stupid IE</title> <style type="text/css"> td{ font-family:Garamond; } table.Experience{ width:635px; margin-bottom:14px; margin-left:auto; margin-right:auto; margin-top:40px; } tr.expHeader{ font-weight:bold; font-size:10pt; } td.expDate{ width:130px; } td.expCo{ width:205px; } td.expLoc{ text-align:right; width:505px; } td.expList{ font-size:11pt; text-align:justify; } td.expList ul{ margin-top:3px; list-style-type:square; margin-bottom:6px; } td.expList ul li{ margin-bottom:2px; } </style> </head> <body> <table class="Experience" cellpadding="0" cellspacing="0"> <tbody> <tr class="expHeader"> <td class="expDate">Here is a td</td> <td class="expLoc">Averyveryreallylonglongwordthatislonger</td> </tr> <tr> <td class="expList" colspan="2"> <ul> <li> This is a bullet item. Such as those that you may see in various lists around the world. The most famous bullet item, the semi-bollesque bullet field of 1997, gained notoriety for the fact that it was the first publicly known bullet item with the ability to break the sound barrier. </li> </ul> </td> </tr> </tbody> </table> <table class="Experience" cellpadding="0" cellspacing="0"> <tbody> <tr class="expHeader"> <td class="expDate">Here is a td</td> <td class="expLoc">This time I broke it up a little bit. See what happens?</td> </tr> <tr> <td class="expList" colspan="2"> <ul> <li> This is a bullet item. Such as those that you may see in various lists around the world. The most famous bullet item, the semi-bollesque bullet field of 1997, gained notoriety for the fact that it was the first publicly known bullet item with the ability to break the sound barrier. </li> </ul> </td> </tr> </tbody> </table> </body> </html> Hello, just starting here I complete the HTML an CSS tutorials at http://www.w3schools.com/ I also downloaded a trial for coffeecup I am helping a local business with their website, it is very simple, just content and a couple of pictures. For some reason, as much as I google it up I cannot figure out how to add a left column to the site. the examples I find, even free templates from Amaya use tables. I dont want to use tables, I guess I need to use div? But if that is so, how do I position my column? It seems w3schools gave me a good start but I am having problems putting the concepts together. If you can direct me to the right answer, or recommend a book or tutorial that actually builds a simple site with a couple of columns in good design, I would really appreciate it. But I dont want to use tables as I learned it is not best practice Thank you! |