HTML - Relative File Path Navigation - But Going Backwards?
I'm perfectly comfortable with file paths when going forwards but in my site i've got html files in sub folders and I want to be able to go back to the root.
Example. In my main htdocs folder i've got my index and stylesheet But i've also got a folder called leagues and in that folder i've got a file called leaguetables.html. In the top of my /leagues/leaguetables.html file I want to be able to reference the stylesheet in the root folder but how do I call it? I want to avoid using the full website name e.g. http://mannyroadend.co.uk/stylesheet.css as that feels like bad programming so how's it done? Thanks. Similar TutorialsHi. I like to include an image in my html file. The file itself is located at: C:\Documents and Settings\Pourang\Desktop The image is located at: C:\Documents and Settings\Pourang\Desktop\VIDEO_TS According to Head First With HTML book: This is the path I must include in my <img> empty element: <img src=" VIDEO_TS/the name of image file " OR: /VIDEO_TS/the name of image file " Right? relative paths or something else it's called. But I can't get it right? it's a broken link, no image is uploaded. Can you help me with this? thank you. I need to be able to specify <base> something like: Code: <base href="../html/"> but this doesn't work. I have tried: Code: <base href="file://../html/"> but that doesn't work either. Howeve, if I use an absolute path like: Code: <base href="file://C:\html/"> it works fine. Is there a way to specify a relative path in a <base> tag? Thanks, -sbs Hi All, Good Evening I am new into this forum..My question i have a .html file which are having images mentioned as absolute path.How to provide them in relative path so that when i run the same html in other machine it should run well without any disapperaing of icons. Below is the small tag code which need to be converted. Quote: <h3> <a href="#redirect"><font size=4.2 face=" Palatino Linotype" color="#9400D3">a) About Tool <img border="0" src="C:\\Forum Tool Code\\SNF Automation Executor_April20_2009\\Images\\edit.png" width="30" height="25"> </font> </a> </h3> Thanks in advance. regards, Viswanadh Hi, Greetings..! In the <img> can I refer to a system folder means I need to refer to a image that is in application data or home drive like %homedrive% or %appdata% will this work..? Thanks SaNv... Ok I had someone recently create me a new myspace layout. We will be using various images for the layout that I will be changing myself from time to time. He needs to know the file path of where I'll be storing these images on my server so he can link all the images correctly. I guess for right now I was just going to use my home computer as the server & just get the hosting? What do you guys think? Also when creating the file path, none of the folders that I want to use can have a space between the folder name right? Like it must be: AcidTripMedia Not Acid Trip Media Right? I must take all of the spaces out of the names of the folders I want to use? Two of the cells seems to be rendering backwards. Why is that? I'm just getting started w/ html, browsing the Jalfrezi tutorial site for tables (see merging/combining cells), and found this odd example. Code: <TABLE BORDER=1> <TR> <TH ROWSPAN=2></TH> <TH COLSPAN=2>Rating</TH> </TR> <TR> <TH>Sad</TH> <TH>Cool</TH> </TR> <TR> <TH ROWSPAN=2>Artist</TH> <TD>Belle & Sebastian</TD> <TD>Michael Bolton</TD> </TR> <TR> <TD>Bentley Rhythm Ace</TD> <TD>Mariah Carey</TD> </TR> </TABLE> It renders sad/cool flipped. Shouldn't cool be to the left of sad because it is declared before it? Thanks. I'm very new to HTML/CSS/Javascript. In the website I'm trying to build, I want to display a relatively simple navigation menu on the left side of the webpage, similar in look to the one here (example): http://build-website.com/design/opportunity.html Is there some way to put the initialization text for the navigation menu in a separate .html file (or, just some other file), so that every time I want to add a section/link to the nav menu, I won't have to go through each of my web pages individually and add the code for the link? (I am not going to use frames because, among other things, that would make it more difficult to bookmark and copy addresses of individual pages) I have been teaching myself through the w3schools tutorials, but despite looking through them and googling for answers I haven't been able to find a solution. Is this possible in HTML? Something that would allow something like like <div src="navmenu.html"> would be ideal but I haven't been able to find anything. (At the moment I'm just using notepad and typing in code manually) I'm using a popular php video-sharing script for my web site. I've modded it so vistors must pay to view a video, however the path to the thumbnail appears on the html page in the View Source code, which is very similar to the path to the actual video. Is there any way to hide the path code? I have a link from a web page to a page on another server. The link works fine, but the Title at the top of the new page displays the full path as well as the HTML allocated Title. Can anyone advise me how to stop the path being displayed? Thanks Dave Hey. I was wondering if this php code can be put into html? HTML Code: include($phpbb_root_path . 'PATH' . $phpEx); Or is there some other html code with does that same job? Hello All, I have a problem with div position in my html page. I need two divs position=relative aligned with a single div. Basically I have a header panel, content panel (have two vertical column height changed dynamically) and a footer panel. So Content panel vertical column needs to align with header panel. I need all div tags position relative, so when every div increases in height bottom div sifted down automatically. I have this http://www.arunverma.info/webmaster_help/ Can sombody help me to short it out. Thanks in advance Sunil Hi to all. I'm trying to achieve a pure relative html layout by implementing only percentage values (without any pixel position or dimension). This way i want to get an html page which would appear the same in all of resolutions and browsers. I attached a simple html page, written in this relative manner. However, i have 2 issues with it: 1) some empty space on the right of the html body in FF. 2) disarranged look in IE (small image lifted up, and empty space below the page body). Is there a hack for IE to render this page properly, and a way to force FF to not display mentioned empty space? (Also, but less important, there is a minor (height) position difference of the small image /bacardi.gif/ viewed in 1024x768 & 800x600, and likely in higher resolutions too, but my graph.card cannot display it.) Many thanks in advance Hi there, I want my images to have specific positions within my website but so far I seem to get it wrong. this is the html: <body> <div class="top"> </div> <div class="logo"><img src="img/logo.jpg" /></div> <div class="wrapper"> <div class="1"><img src="img/1.jpg" width="450" height="450" /></div> <div class="2"><img src="img/2.jpg" width="215" height="220" /></div> <div class="3"><img src="img/3.jpg" width="215" height="220" /></div> <div class="4"><img src="img/4.jpg" width="215" height="450" /></div> </div> </body> this is the css body { background-color:#FFFFFF; color:#000; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .top { width:100%; height: 33px; background-color:#0D0D0D; } .logo { position:relative; margin: 0 auto; border: none; padding:0; width: 400px; height: 130px; margin-top:25px; } .wrapper { position:relative; margin: 0 auto; border: none; padding:0; width: 900px; height: 700px; margin-top: 25px; } .1 { position:absolute; width: 450px; height: 450px; left: 0; top: 0; } .2 { position:absolute; left:460px; width: 215px; height: 220px; top: 0; } .3 { position:absolute; left:460px; top:230px; width: 215px; height: 220px; } .4 { position:absolute; left: 685px; width: 215px; height: 450px; } Basically I want something like this site http://www.aardvarkbrigade.com/ where the images seem to be placed in specific positions. Would be great and I would be thankful if someone could help me Hi Folks, I have multiple objects which are positioned relative to one another. The position of the first object is fine but the subsequent ones reference the position of the previous one. Is there any way I can make a hidden "base" object and position relative to that without re-creating it for each object? Thanks! Hi, While parsing relative URL segments "../" to hierarchical segments of the absolute URL , I notice that the <a> tag and the <link> tag do this differently. Take the following absolute and relative URLs: absolute URL: http://www.a.com/a/b relative URL: ../../b/c.css The <a> tag resolves this to: http://www.a.com/b/c.css However the <link> tag resolves this to: http://www.a.com/a/b/c.css It appears that all other forms of resolving URLs are equal between both tags however, I have been trying to find the RFC specification on this but have had no luck. This document http://www.ietf.org/rfc/rfc2396.txt does not contain any information regarding the <link> tag. Is anyone here familiar with this or know where I could obtain more information. Thanks, Bandito http://www.gaihosa.com I've got a wrapper to keep my content in the center, and want a header background to spread across the whole page width. I've kept the header image outside the wrapper, so I assumed it wouldn't conform to the wrapper's width restrictions. Here's the example: http://samehkhan.com/index%20-%20Copy.html I've got no idea why there is a 10px margin around the header image. That's what I need help with. Also, if you have a better way for me to do it, I'd appreciate it. Thanks Hi, I'm trying to build a program that automatically picks images from a given web page. As you know, there's a lot of relative paths used on those. Now, I got to my first big problem, this is the address I'm trying to use: http://www.nba.com/games/20090117/ORLDEN/preview.html this is the address where image is: http://www.nba.com/media/homepage/bullet_video.gif and this is the address source code refers to: img src="/media/homepage/bullet_video.gif" border=0 Now, note that there's no ".." in the front of that address. Question: How can I determine based on the address when the location of image is http://www.nba.com/media/homepage/bullet_video.gif and when it is http://www.nba.com/games/20090117/OR...llet_video.gif And yes, this is 100% about automatizing the process, so the answer I'm looking for has to be something I can tell to VBA (the language I'm using to write my program). Thank you for any answer. Hi folks, I have a simple centered web page that does not show the same in IE and Firefox. The problem just seems to be the first occurrence of position:relative which I used to center the page in a 'container'. Experts in this forum and others say I should fix this by using the right Doctype statement. But when I tries using any of the recommended Doctypes, the display was totally skewed in both IE and FF. You can see the normal page with no Doctype statement at: http://www.documents4u.com/Document-...Contactus.html It displays fine in IE but notice in FF the top horizontal bars are higher. When I put in a Doctype statement, everything is messed up in both IE and FF, as you can see in: http://www.documents4u.com/Document-...ontactus2.html Any suggestions on how I can fix this discrepancy? Is it my code or am I not using the right Doctype? I'm scraping some websites and I've come across a site with a weird link structure. The <a href> shows a relative link, but that relative link added onto the current link does not equal the absolute link I see on the bottom of my browser. If I want to make a robust web crawler, how do I detect that a certain site will have such an abnormality? |