HTML - A Pure Relative Code
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 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. 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, 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 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 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 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 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 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! 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? I'm looking for a way to have a link to a hard drive - that works both with a Windows machine (not running Resin), and a Unix (Macintosh) machine. Obviously I can't hard code file:///C:/htmldocs/home_page.html and have it work on a system without a C: drive. So lets say there's a site called TheEthnicsOfCreamCheese.com At TheEthnicsOfCreamCheese.com's home page, there are three links. One says "About", the next says "Contact", and the last says "Images." The first link leads to TheEthnicsOfCreamCheese.com/about, the second leads to TheEthnicsOfCreamCheese.com/contact, and the last leads to TheEthnicsOfCreamCheese.com/images. How do they create these separate pages? I use 000webhost if that matters. I tend to use the file manager provided on it, because I have no idea how to forward ports and all that. I'm sorry if this is an over-asked or overly-simple question, or if I asked it in the wrong forum because I really don't know, but I didn't want to look like an idiot and ask my friend who knows a ton about HTML. So I decided to ask it rather anonymously on the first result when I Googled HTML Help forum So yeah thanks sorry bye All of my links are relative, meaning if I type: Code: <a href="http://www.google.com">Google</a> the link tries to go to "http://<mydomain>.com/http://www.google.com" Am I missing something? Hey everyone, got a problem with an element that is relatively, or absolutely, positioned (I've tried both methods and both produce the same results). Take a look here with anything but Internet Explorer: http://zachi.teamtreetops.com *Screenshots of whats wrong in IE* The "bottom" div element is off in both cases. ie5 ie7 Code: div#bottom{ height:11px; width:411px; background-image: url(images/bottom.png); position:absolute; } Complete style sheet Any insight on the issue would be much appreciated! Hi all, Help on this would clear up this headache. I am using relative position to put this flash component flush with the right side of the layout. However, in different screen resolutions it still moves. Why is this? for ref: www.burnthisforyourfriends.com Here's the code: <html> <head> <title>Burn This for Your Friends, show dates, music, media, downloads and store</title> </head> <body bgcolor="#000000"> <center><img src="http://img704.imageshack.us/img704/3791/burnthisheader.jpg" /> <br /><a href="http://www.burnthisforyourfriends.com/index.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="Home" border="0" /></a><a href="http://www.burnthisforyourfriends.com/releases.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="releases" border="0" /></a><a href="http://www.burnthisforyourfriends.com/artists.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="artists" border="0" /></a><a href="http://www.burnthisforyourfriends.com/studio.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="studio" border="0" /></a><a href="http://www.burnthisforyourfriends.com/gallery.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="gallery" border="0" /></a><a href="http://www.burnthisforyourfriends.com/bookinginfo.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="bookinginfo" border="0" /></a><a href="http://www.burnthisforyourfriends.com/press.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="press" border="0" /></a><a href="http://www.burnthisforyourfriends.com/store.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="store" border="0" /></a><a href="http://www.burnthisforyourfriends.com/contactus.html"><img src="http://img704.imageshack.us/img704/686/mainnavigationplacehold.jpg" alt="contactus" border="0" /></a> <br /><img src="http://img514.imageshack.us/img514/9773/flashplaceholderred.png" /><img src="http://img163.imageshack.us/img163/8006/flashplaceholdergreen.png" /><img src="http://img340.imageshack.us/img340/4820/flashplaceholderyellow.png" /> </center> <div style="position: relative; top: 20px; left: 659px;"> <p> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript"><!-- 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 Never mind you guys were wrong as usual. Thanks. Ok so im making a webpage for my CSC class for school. And i have been designing the webpage on my macbook under the desktop folder called "CSCWebpage". I uploaded the folder into my ftp and i opened up one of the pages in firefox and the relative links are not working. such as img, a, my image map image, and also my css file i cant connect to. I know this is a noob question, so im sorry for the ignorance! im new. lol. 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. Hi, I need to embed some HTML content in a container, so that the content's elements anchored at absolute position 0 will actually follow the container's position. What should I use as container? Frame, DIV, IFrame? Thanks! |