HTML - Random Space Unaccounted For In Code, Need To Fix Asap
I am currently re-coding my school's website because it was coded in HTML 4.01 and the code was extremely messy anyways. I'm recoding it in XHTML Strict. Everything was going fine, I got the homepage perfectly replicated with much nicer code, then somehow after I had finished the homepage, I refreshed it and there was a random space between the header and the nav bar. You can see it he
General Amherst School Website Can someone please take a look at the code and tell me why it's happening!? It was totally fine, but then I changed some random insignificant thing unrelated to the nav bar or the header and that happened. I'll paste the stylesheet below so you on't have to download it: Code: body { background-image: url('images/bg.jpg'); background-repeat: repeat; background-attachment: fixed; margin: 8px auto 0 auto; width: 828px; } #header { width: 700px; height: 250px; margin: 0; padding: 0; float: left; background-image: url('images/designimages/headermid.png'); text-align: center; } #nav { height: 50px; width: 700px; padding: 0 0 0 64px; text-align: center; background-image: url('images/designimages/navbg.png'); background-repeat: repeat-x; line-height: 50px; font-size: 19px; float: left; color: #ffffff; } #main { width: 764px; margin: 0; padding: 0 64px 0 0; background-image: url('images/designimages/bodyend.png'); background-position: right center; background-repeat: repeat-y; clear: both; } #nav a:link { color: #ffcc00; font-weight: normal; } #nav a:visited { color: #ffcc00; font-weight: normal; } #nav a:hover { color: #ffcc00; text-decoration: none; font-weight: normal; } #nav a:active { color: #ffcc00; font-weight: normal; } a:link { color: #ff0000; } a:visited { color: #ff0000; } a:hover { color: #ff0000; text-decoration: none; } a:active { color: #ff0000; } img {border:0;padding:0;margin:0;} h1 { margin: 0; padding: 0; font-family: Gill Sans, Trebuchet MS, sans-serif; font-size: 24px; } h2 { margin: 0; padding: 0; font-family: Gill Sans, Trebuchet MS, sans-serif; font-size: 16px; text-decoration: underline; } h3 { margin: 0; padding: 0; font-family: Gill Sans, Trebuchet MS, sans-serif; font-size: 13px; text-decoration: underline; } p { margin: 0; padding: 0; font-family: Gill Sans, Trebuchet MS, sans-serif; font-size: 13px; line-height: 16px; } Similar TutorialsI am an Admin for a PC gaming clan ( |ESF| ), and we have several game servers. Our goal is to have a random "server of the day" widget on the main page of the site. Here is what we need it to do: > Show the same server for all visitors to the page > Show the same server for a 24 hour period, say from 12am - 11:59pm > Have the code editable in case we change/add/remove a server I have some experience in Vb6 and Vb.Net, but not much HTML. I would assume the code would be something similar to: Dim SOTD As New String (Server of the Day) "Server List" Dim s1 As New String (Server 1) Dim s2 As New String (Server 2) Dim s3 As New String (Server 3) If TimeOfDay Is 12:00am Then Show SOTD(Random Server from List) Until TimeOfDay Is 11:59pm End If I know that isn't close to HTML, but it should help get the overall point across. Any help to get us closer to this goal is MUCH appreciated. If I wasn't specific enough with the above information, please let me know what else you need to know. It's very late and I'm super tired. Thank you in advance. I have been using the script below to make it so that a random image is displayed every time the page is refreshed or accessed. It has worked very well, but what i am wondering is does anyone know how to make this code adapt to embedding video urls, so a random video would be displayed from the list whenever the site was accessed or reloaded? I have tried several variations without luck. I am not really a coder so most of what i do is trial by error, but i was hoping someone else might be able to point me in the right direction. Thank you! Here is the code i am using for the random image generator: HTML Code: <SCRIPT language="Javascript"><!-- function image() { }; image = new image(); number = 0; // imageArray image[number++] = "<img src='First Image url' border='0'>" image[number++] = "<img src='Second Image url' border='0'>" increment = Math.floor(Math.random() * number); document.write(image[increment]); //--> </SCRIPT> So, I'm creating a script for a MMO (videogame) that supports most HTML elements in creating scripts for the game. What I'm currently doing is making a script that pulls open a small window for people to view information. EX: <a href="text://Information">Link</a> It's setup basically like that, except there is obviously alot more information, and I'm using certain fonts and colors for the information inside. Now here comes the tricky part. I also need to place links WITHIN the link, so it will move to another window of information. I've successfully done this so far. The problem, is that I cannot add any tags within the second link. When I do, it causes the link to mess up. EX: <a href="text://Information1 <a href='text://Information2'>Link2</a>">Link1</a> This link would work. But it would simply show the information without any organization or colors. When I add the <font> tag, or any other tag for that matter, it breaks the link. ANY assistance in this matter would be greatly appreciated, as I need this to be up and running very soon! Hey, just so everyone knows beforehand i would like to let you know i know how to code i just cant on the computer i am on currently as certain applications are blocked. I would like a code for a site that when first going to it requires a username and password, a registration if possible (haha need to register dont you.). And once signing in takes to a chat room. Thanks. RESPOND ASAP PLEASE Hey, I have a bunch of text fields with the same field name <input type="text" name="var" value="$cost"> <input type="text" name="var" value="$cost"> <input type="text" name="var" value="$cost"> <input type="text" name="var" value="$cost"> i need to have a text field display the sum off all text fields named "var" <input type="text" name="total_var" value="total'> just a simple javascript code - I googled "add text fields" and all i get is how to add a text field to a web page, lol help asap please! Hi, I hope someone can help me. If you go to http://www.mnautocare.com and click on the contact us link or the services link, it sends the browser to a totally different website. If you copy the link address and paste it in your browser it is http://www.mnautocare.com/services.html. When it goes to my other site precision marketing, it comes up with http://www.precisionmarketingmn.com/services.php. I deleted the htaccess file, i deleted the links, I deleted the services page and nothing worked. I NEED to get this fixed asap and I am completely out of options. Please reply to this post if you feel you can help or email me. PLEASE and THANK YOU! Todd Hi All OK here is situtation. I have a WMV video file I made and uploaded to a hosting site that allows hot linking and such. Anyways I got an embed code of fthe web from an HTML website not host site as they didn't have one for embedding and tested it in my HTML editor and video played great. I then tried to add the code to my profile on a social network I belong to. And I can't even get a player to show up let alone play. Now so you know I have already embedded videos off of youtube and another similar website and those work great so I know embedding isn't disabled as others play just fine. What am I doing wrong that those play and mine won't even though it works perfectly in my HTML editor Here is one code I tried with both file name areas fixed with the videos URL Quote: <OBJECT ID="MediaPlayer" WIDTH="400" HEIGHT="400" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> <PARAM NAME="FileName" VALUE="videofilename.wmv"> <PARAM name="autostart" VALUE="false"> <PARAM name="ShowControls" VALUE="true"> <param name="ShowStatusBar" value="false"> <PARAM name="ShowDisplay" VALUE="false"> <EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer" WIDTH="400" HEIGHT="400" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED> </OBJECT> TIA Dave Hello everyone. I am currently working on a new project for our website. This new project is a News Ticker, with a menu that goes under the News Ticker. The problem I am having is the Menu, where I have DIV's displaying different HTML pages. It works like I want it to, but the problem I am most having is overlaying the HTML DIV's. When I click on a link, it shows the DIV window like I want to. Let's say for example I have selected Menu 1, now I selected Menu 2. I want to show Menu 1 again, but it won't unless I refresh the web page. I have attached an image below so you can see the image I am talking about above. Menu 1 Selected: Menu 2 Selected: When selecting Menu 1 after Menu 2 has been selected, it won't show. Any way to fix this? Thanks for your help, I really appreciate it! CJ I need a table that has 1 row and 3 columns. The entire table must be 100% width of the screen, yet the center column needs to be 550 pix wide and centered between the 2 outer columns It has to be this table, and it can't be a table within a table. Is there anyway of doing this? and is this understandable? If so can you send me the code for this Thanks in advanced. Alex Hello I'm having terrible trouble aligning my text into a layout using tables i will include a screen shot to show what im talking about. i thought i could fix it by putting valign=top in the td tag but nothing seems to be working if someone could help me out i would greatly appreciate it. THanks heres the screen OK so I am grabbing this code off of a local news site (WRAL) and when I embed into a myspace page, only portions of the script are showing up, not the video. So there is something wrong with the code itself i'm sure, I just don't know what. Here is the code. Do you guys see any errors he Quote: <script src="http://www.wral.com/entertainment/video/2820107/?version=embedded" type="text/javascript"></script><script type="text/javascript"> width=330; height=280; wral_insert_video_player_2820107(width,height); </script> Hey there, I'm feeling my through the dark trying to put an animated sliding panel on my site. It works, but its initial state is open, which defeats its purpose. Will someone please look at this short code and let me know what to do? Thanks! Here's the HTML, followed by the CSS, followed by the javascript: <html> <head> <link type="text/css" rel="stylesheet" href="Animated-Collapsible-Panel-5.css" /> <script language="javascript" type="text/javascript" src="Animated-Collapsible-Panel-5.js"></script> </head> <body> <!-- Animated collapsible panel, with separate CSS and JavaScript --> <div style="width:470px;"> <div class="squarebox"><div class="squareboxgradientcaption" style="height:20px; cursor: pointer;" onclick="togglePannelAnimatedStatus(this.nextSibling,50,50)"><div style="float: left">I bequeath myself to the dirt to grow from the grass I love...</div><div style="float: left; vertical-align:left"><img src="../images/collapse.gif" width="25" height="5" border="0" alt="Show/Hide" title="Show/Hide"/></div> </div><div class="squareboxcontent"> <img width="150" height="150" src="http://www.lesliehawes.com/wordpress/wp-content/uploads/2008/09/chief-joseph-pendleton-blanket-pattern.jpg" alt="This is an image" title="This is an image" /><br />Content goes here...</div> <img width="170" height="0" alt="" src="../images/shadow.gif"/> </div> </body> </html> .squarebox { width: 215%; text-align: center; overflow: hidden; } .squareboxgradientcaption { color: #ffffff; padding: 5px; background-image: url( ); background-repeat: repeat-x; } .squareboxcontent { background-color: #f5f5f5; padding: 10px; overflow: hidden; border-top: solid px #336699; } // not animated expand/collapse function togglePannelStatus(content) { var expand = (content.style.display=="none"); content.style.display = (expand ? "block":"none"); toggleChevronIcon(content); } // current animated collapsible panel content var currentContent= null; function togglePannelAnimatedStatus(content, interval, step) { // wait for another animated expand/collapse action to end if (currentContent==null) { currentContent = content; var expand = (content.style.display=="none"); if(expand) content.style.display = "block"; var max_height = content.offsetHeight; var step_height = step + (expand ? 0 : -max_height); toggleChevronIcon(content); // schedule first animated collapse/expand event content.style.height = Math.abs(step_height) + "px"; setTimeout("togglePannelAnimatingStatus(" + interval + "," + step + "," + max_height + "," + step_height + ")", interval); } } function togglePannelAnimatingStatus(interval, step, max_height, step_height) { var step_height_abs = Math.abs(step_height); // schedule next animated collapse/expand event if (step_height_abs>=step && step_height_abs<=(max_height-step)) { step_height += step; currentContent.style.height = Math.abs(step_height) + "px"; setTimeout("togglePannelAnimatingStatus(" + 2 + "," + 2 + "," + max_height + "," + step_height + ")", interval); } // animated expand/collapse done else { if (step_height_abs<step) currentContent.style.display="none"; currentContent.style.height = ""; currentContent = null; } } // change chevron icon into either collapse or expand function toggleChevronIcon (content) { var chevron=content.parentNode .firstChild.childNodes[1].childNodes[0]; var expand=(chevron.src.indexOf("collapse.gif")>0); chevron.src=chevron.src .split(expand ? "expand.gif" : "collapse.gif") .join(expand ? "collapse.gif" : "expand.gif") } Hi all! I've recently been doing some work revamping the website for my dad's construction company, seen here. He originally created it in Dreamweaver years back and I've been using SeaMonkey to update it. I have pretty limited HTML knowledge and this is the first time I've actually done any real form of web editing. I've done the bulk of it but I really need some advice on a couple of small problems I can't seem to figure out: 1) As you can see, on the left hand side there's a list of links that change colour on mouse-over. They seem to be working fine on all pages apart from 'testimonials'. When I click that link and arrive at the page headed 'testimonials and references', the mouse-over effect doesn't seem to be working on any of the images. I've looked at the source and tried to figure it out, but as I said, I have pretty limited knowledge and couldn't spot anything obviously wrong. 2) If you go the page entitled 'services' you'll see a large image at the top. If I do anything to the image; delete it, resize it, move it slightly in any way - the whole framework of the page goes completely out of whack. It looks fine on the Composer but testing it on Chrome shows the whole side panel of links about a mile lower than where I want them and completely out of alignment with all of the other pages. I just want to resize the image slightly so it's not to in-your-face, but not at the risk of messing up the whole page layout. I can't work this one out at all, so any help would be greatly appreciated. You might also notice the 'about us' page is the only one where the links are slightly out of alignment with the others - if anyone can work out how to change that, that would be ace. Thanks a lot guys. D. i almost went crazy trying to troubleshoot this one... thought i'd share. HTML Code: <style type=text/css> a:link {font-family:Arial, Helvetica, sans-serif; font-size:12px;} </style> <table width="200" border="0" cellspacing="0" cellpadding="0"><tr> <td width="100" valign="top"> <a href="link">Sample text </a> <td width="100" valign="top"> <a href="link">Sample text</a> </td></tr></table> Turns out a "space" at the end of the link text pushes the text upwards slightly. Simply remove the space (or add on to the other line) or use the space code [ ] The css also plays a part, this doesn't appear happen when text is "unformatted" Hi Experts, I am facing some problem in the row spaces. I am new to project and previous programmer used some tool to write HTML code. now I am not able to understand the HTML part of code. I don't know why but the first row table border is missing in this. Here is the code:- <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='margin-left:25.0pt margin-bottom:25.0pt;border-collapse:collapse'>" + "<tr height=25 style='height:19.1pt'> <td width=551 colspan=2 height=25 valign=top style='width:413.2pt;border: none;border-bottom:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt; height:19.1pt'> <p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>Hi " + Item[4] +",<o:p></o:p></span></font></p> <p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p> <p class=MsoNormal style='text-align:justify'><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>It was a pleasure talking to you. Based on our discussions I have forwarded your resume to my Business Development Manager (see below) who will be either calling or emailing you very soon with other details.<o:p></o:p></span></font></p>" + "<br><p class=MsoNormal style='text-align:justify'><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>The job description for this assignment is as follows:<o:p></o:p></span></font></p><p class=MsoNormal style='margin-left:3.45pt'><font size=2 f=Arial><span style='font-size:11.0pt;font-family:Arial'><o:p> </o:p></span></font></p></td> </tr>" + "<tr height=34 style='height:25.4pt'><td width=132 height=34 valign=top style='width:99.3pt;border:solid windowtext 1.0pt; border-top:none;padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal align=right style='text-align:right'><b><font size=2 color="+ String.valueOf((char) (34)) +"#3366ff"+ String.valueOf((char) (34)) +" face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma; color:#3366FF;font-weight:bold'>Location:<o:p></o:p></span></font></b></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p></td><td width=619 height=34 valign=top style='width:313.9pt;border-top:none; border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>" +Location +"<o:p></o:p></span></font></p></td></tr>" + "<tr height=34 style='height:25.55pt'><td width=132 height=34 valign=top style='width:99.3pt;border:solid windowtext 1.0pt; border-top:none;padding:0in 5.4pt 0in 5.4pt;height:25.55pt'><p class=MsoNormal align=right style='text-align:right'><b><font size=2 color="+ String.valueOf((char) (34)) +"#3366ff"+ String.valueOf((char) (34)) +" face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma; color:#3366FF;font-weight:bold'>Job description:<o:p></o:p></span></font></b></p><p class=MsoNormal align=right style='text-align:right'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p></td><td width=619 height=34 valign=top style='width:313.9pt;border-top:none; border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:25.55pt'> <p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +">" +DesC +"</p></td></tr>" + "<tr height=34 style='height:25.4pt'><td width=132 height=34 valign=top style='width:99.3pt;border:solid windowtext 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal align=right style='text-align:right'><b><font size=2 color="+ String.valueOf((char) (34)) +"#3366ff"+ String.valueOf((char) (34)) +" face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma; color:#3366FF;font-weight:bold'>Duration:<o:p></o:p></span></font></b></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p></td><td width=619 height=34 valign=top style='width:313.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>" +Duration +"<o:p></o:p></span></font></p></td></tr>" + "<tr height=34 style='height:25.4pt'><td width=132 height=34 valign=top style='width:99.3pt;border:solid windowtext 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal align=right style='text-align:right'><b><font size=2 color="+ String.valueOf((char) (34)) +"#3366ff"+ String.valueOf((char) (34)) +" face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma;color:#3366FF;font-weight:bold'>Details:<o:p></o:p></span></font></b></p><p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p></td>" + "<td width=619 height=34 valign=top style='width:313.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>TBD</span></font></p></td></tr>" + "<tr height=34 style='height:25.4pt'><td width=132 height=34 valign=top style='width:99.3pt;border:solid windowtext 1.0pt; border-top:none;padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal align=right style='text-align:right'><b><font size=2 color="+ String.valueOf((char) (34)) +"#3366ff"+ String.valueOf((char) (34)) +" face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma; color:#3366FF;font-weight:bold'>BDM / Marketing Manager<o:p></o:p></span></font></b></p></td><td width=619 height=34 valign=top style='width:313.9pt;border-top:none; border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:25.4pt'><p class=MsoNormal><font size=3 face="+ String.valueOf((char) (34)) +"Times New Roman"+ String.valueOf((char) (34)) +"><span style='font-size:12.0pt'>" + StaffName + " " + basUtilities.DLookup("EXT" , "EmailContact", "FirstName='" + basUtilities.UserID() + "'") + "<o:p></o:p></span></font></p> </td></tr>" +NewColumSkill +"</table>" + Please help me to fix this. This isn't merely an attempt to sound like something from "The Matrix", but I'm continuing to work on my companies website and for some reason in IE when I place a picture at a certain place the web page give me enough room to scroll the page right. (There isn't anything there, it just has a scroll bar at the bottom and you can scroll the whole thing right leaving it half off the page looking at just background.) Link: http://802heaven.analogcafe.net/TTCBeta/mainstage.html If someone could take a look at that and tell me some ideas for how to fix it that would be GRRRR8. Thanks. Just moved the site to its new server and added the navigation... now suddenly I have some spacing at the top and I need another set of eyes. http://www.phinfever.com/newsite Note*: Spacing not visible on IE7... it is on Firefox3 Hey guys, Need a little help with... http://www.netsketched.com/NRG/ There is a space up top that I can't get rid of. Also, is there a way I can make the layout flow to the bottom regardless of the amount of content? Hey there! Is it possible to have a random GIF file loaded each time you open the site? For example if you open the page now, an animated GIF will load to advertise x and when you go to the same page later, an ad will load to advertise y. Thanks in advance! I |