tibi Posted September 28, 2011 Author Share Posted September 28, 2011 I dont realy understand what exactly you mean by relative or absolute.The web page in which I try to put the picture is from the file system Link to comment Share on other sites More sharing options...
Ingolme Posted September 28, 2011 Share Posted September 28, 2011 A relative URL is like this: images/file.jpg An absolute URL is like this: file:///C:\Documents%20and%20Settings\User\images\file.jpgOr like this: http://example.com/images/file.jpg I don't really know why your page isn't working, since I can't look at it for myself. Link to comment Share on other sites More sharing options...
tibi Posted September 28, 2011 Author Share Posted September 28, 2011 The URL of the web page is:C:\Documents and Settings\Tnagy\Desktop\My Music\Tibi's\page1.htmThe picture's URL is:C:\Documents and Settings\Tnagy\Desktop\My Music\Tibi's Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 6, 2011 Share Posted October 6, 2011 Hi Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 6, 2011 Share Posted October 6, 2011 Hi Guys I have tried my best to copy the previous path given by duotone fox in regards to adding an img src from a local computer.I m using windows 7 and i wonder how can i find an appropiate path for a picture, might sound silly but honestly i dont know how to find a path for a pciture on windows 7.Please help me out and ill implement the path u guys have advised in the beginning, so i cud add an image to my html page. your help will greatly appreciated.. cheers Link to comment Share on other sites More sharing options...
thescientist Posted October 6, 2011 Share Posted October 6, 2011 show us your code and the structure/locations of your files relative to each other. as I believe has been mentioned, it's best to keep all your images, html, css, script files in one main folder so all paths are relative to a root. Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 6, 2011 Share Posted October 6, 2011 Hi Thanks for your reply. the path i tried was<html><body><img src="file:\\\c:\users\deepak\desktop\pics\DSC_2133\" alt="my picture"\></body></html> and it returns just a box with an "x" pls suggst the right path...thks Link to comment Share on other sites More sharing options...
Ingolme Posted October 7, 2011 Share Posted October 7, 2011 First of all, It's file:///, not file:\\\. The second problem is that you seem to be pointing at a directory called "DSC_2133" and not a file. Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 7, 2011 Share Posted October 7, 2011 Hi Mate I have tried the following code and returns the output as above.May i please know wht i am doing wrong. <img src="file:///c:\users\venkat\desktop\sid\" alt="sid"> where "sid" is the file name of the picture i have saved on my desktop. i appreciate ur response. cheersDeepak. Link to comment Share on other sites More sharing options...
dsonesuk Posted October 8, 2011 Share Posted October 8, 2011 You need to identify the image file type, and add the extension, for example sid.jpg, sid.gif, or sid.png. so if it were a .jpg image file type, you would use <img src="file:///c:/users/venkat/desktop/sid.jpg" alt="sid"> Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 8, 2011 Share Posted October 8, 2011 Hi Duotone and Devoted member. thanks for ua help.... it worked for me this time... many thnks. Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 23, 2011 Share Posted October 23, 2011 Hi Guys I am trying to add an image as a background, but the image gets multiplied across the window,pls check if the code is the fine:- <html><head><style type="text/css">.img{background-image:url("file:///users/deepakshowri/desktop/deepak.png/")} </style></head><body class="img"><p>some text</p></body></html> thnks. Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 23, 2011 Share Posted October 23, 2011 in realtion tot he above ,can i pls know how i can add an image whihc fits the entire screen.. thnks Link to comment Share on other sites More sharing options...
thescientist Posted October 25, 2011 Share Posted October 25, 2011 Hi Guys I am trying to add an image as a background, but the image gets multiplied across the window,pls check if the code is the fine:- <html><head><style type="text/css">.img{background-image:url("file:///users/deepakshowri/desktop/deepak.png/")}</style></head><body class="img"><p>some text</p></body></html> thnks.look into background repeathttp://www.w3schools.com/css/css_background.asp in realtion tot he above ,can i pls know how i can add an image whihc fits the entire screen.. thnksthat depends, are you trying to tile an image, or use a large image and stretch across the screen fluidly? Link to comment Share on other sites More sharing options...
deepak.ramineni Posted October 26, 2011 Share Posted October 26, 2011 Hi Scientist thnks for ur reply i mam trying to fit the image to te entire screen, probably a big image , so i cud use it as background for my website.pls help me on this. cheers Link to comment Share on other sites More sharing options...
dsonesuk Posted October 26, 2011 Share Posted October 26, 2011 What you want is all covered here http://w3schools.invisionzone.com/index.php?showtopic=40153&hl=&fromsearch=1 Link to comment Share on other sites More sharing options...
deepak.ramineni Posted November 3, 2011 Share Posted November 3, 2011 hi i am trying to specify height and width for a background image using the follwing code , but it didnt work <style type="text/css">body{background-image:url("file:///users/deepakshowri/desktop/deepak.png") height:120px';width:60px;}</style> pls correct me Link to comment Share on other sites More sharing options...
eTianbun Posted November 3, 2011 Share Posted November 3, 2011 In your code, u are trying to defined the width and height of the <body> element to 60*120 and not the background-image. Use the link dsonesuk gave you...There was even an ERROR in your code! The apostrophe after the height declearation should never be there:height:120px' , there was no semi-colon b4 the height declearation...The semi-colom must be present, for you to be able to set width and height of the body tag Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.