遊客:  註冊 | 登錄 | 幫助





標題: [求助] help me ~~~web design HTML Frames
  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-11 07:38 PM  資料  個人空間  短訊  加為好友 
help me ~~~web design HTML Frames

this week, my lecturer giving us a new assignment,so i try myself.But i found something, when i cr8 a new website , for example ,

<html>
<head>
<tittle>I LOVE TONY </tittle> <br>
</head>
<body background="C:\Users\Public\Pictures\Sample Pictures\Dock.jpg">
this is my 1st web page.<b>i love u</b>
</body>

</html>

why my background doesn't come out the Dock photo ???the picture is originally in My pictures there...why when i put <body background="C:\Users\Public\Pictures\Sample Pictures\Dock.jpg"> it doesn't work?? why can i put background ??? hopefully both of u can answer me as soon as possible



最後編輯: mickeyGoUp : 2008-7-12 09:46 PM
頂部

mickeyGoUp     Rank: 7Rank: 7Rank: 7
版主
性別 男
UID 5

精華 0
帖子 35511
積分 5235   詳情

閱讀權限 150
註冊 2006-3-24
來自 美國滴滴尼
狀態 離線

 
 
 
 
發表於 2008-7-11 08:48 PM  資料  個人空間  短訊  加為好友 
Hi onlylonely,

The URL in the background attribute must be relative to your web server or a absolute path to some files on server.

For example:

Your page: http:/ /www.mydomain.com/myDir/helloworld.html

Body: <body background="Dock.jpg">
It looks for: http:/ /www.mydomain.com/myDir/Dock.jpg

Body: <body background="images/Dock.jpg">
It looks for: http:/ /www.mydomain.com/myDir/images/Dock.jpg

Body: <body background="/images/Dock.jpg">
It looks for: http:/ /www.mydomain.com/images/Dock.jpg

Body: <body background="http://www.anotherserver.com/Dock.jpg">
It looks for: http:/ /www.anotherserver.com/Dock.jpg

And remember, the URL in the 'background' attribute will be the URL that the client will use to load the pic.  Say, if I am viewing your page, my IE actually downloads the HTML to my computer, and then IE will render the page locally.  When it sees "C:\Users\Public\Pictures\Sample Pictures\Dock.jpg" (and the valid URL should probably be "file:///C:/Users/Public/Pictures/Sample Pictures/Dock.jpg"), it will look for Dock.jp in my local hard drive, and of course, the file cannot be found.

Hope that helps.  



最後編輯: mickeyGoUp : 2008-7-11 08:50 PM
頂部



1022292057     Rank: 4Rank: 4
水中藍
性別 男
UID 17104

精華 0
帖子 165
積分 798   詳情

閱讀權限 50
註冊 2006-12-9
來自 Canada
狀態 離線

 
 
 
 
發表於 2008-7-11 08:55 PM  資料  個人空間  主頁 短訊  加為好友 
i think simiply, he is using XP while typing in the Vista path for pictures folder
My pictures is in C:\Documents and Settings\(UserName)\My Documents\My Pictures for XP

頂部

  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-11 09:28 PM  資料  個人空間  短訊  加為好友 
thx mickey...when i put file:///C:/Users/Public/Pictures/Sample Pictures/Dock.jpg  its works ....thx alot ...love u mickey...and i think i understand what u want to say with me...thx mickey..i still got many problem to ask u...so keep view this post....

mickeyGoUp :
You are welcome! :)

頂部

  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-12 10:37 AM  資料  個人空間  短訊  加為好友 
ok...now i found out 1 more problem...when i need to put row http://www.w3schools.com/html/tr ... =tryhtml_frame_rows
as they teach ...is it i must make 3 html??? and...how i can put the  <frame src="frame_a.htm" > in center ?? just now i put this  <frame src="frame_a.htm" align="center">but its don't works.

頂部

mickeyGoUp     Rank: 7Rank: 7Rank: 7
版主
性別 男
UID 5

精華 0
帖子 35511
積分 5235   詳情

閱讀權限 150
註冊 2006-3-24
來自 美國滴滴尼
狀態 離線

 
 
 
 
發表於 2008-7-12 11:00 AM  資料  個人空間  短訊  加為好友 
回復 #5 onlylonely 的帖子

Yes, each frame has its own contents.  So, the most straight forward way is to create one HTML file per frame.  There are other ways too if the server supports any scripting.  But let's not go there yet.  I don't want to confuse you  

Do you mean you want to put the content of a frame in the center?  Each frame is like an individual web page.  So, to center the content, you just do it in the HTML of that frame src.  In your case above, you should use <center> in the frame_a.htm.  Does it make sense?

頂部

  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-12 11:07 AM  資料  個人空間  短訊  加為好友 


QUOTE:
原帖由 mickeyGoUp 於 2008-7-12 11:00 AM 發表
Yes, each frame has its own contents.  So, the most straight forward way is to create one HTML file per frame.  There are other ways too if the server supports any scripting.  But let's not go there y ...

u means that i cannot put <frame src="frame_a.htm" align="center">?? if i want to make it in center so i must make it on the frame_a.htm ???

頂部

  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-12 12:39 PM  資料  個人空間  短訊  加為好友 
Mickey ....i found 1 more problem...   ....
i wan put a header with background ....like lipscorner ....i wan put the header with the background...1 row back ground only...but when i type this....
<html>
<body background="nice.gif">
<h3>frame A</h>
</body>
</html>

it will duplicate many background....how to do ???i just want 1 row only

頂部

  onlylonely     Rank: 2Rank: 2
藍之初
性別 男
UID 13870

精華 0
帖子 70
積分 100   詳情

閱讀權限 30
註冊 2006-10-13
來自
狀態 離線

 
 
 
 
發表於 2008-7-12 01:10 PM  資料  個人空間  短訊  加為好友 
Mickey , i solve the upside problem using frameset ...but 1more problem created .. that is ...if i put that frame...i cant type the word inside that frame ...
<html>
<frameset rows="30%">
<body>
<noframes>
<h3 align="center">frame A</h3></body></noframes>
<frame src="nice.gif">
</frameset>
</html>

i cant see Frame A this word inside that ...how to solve it?

頂部

mickeyGoUp     Rank: 7Rank: 7Rank: 7
版主
性別 男
UID 5

精華 0
帖子 35511
積分 5235   詳情

閱讀權限 150
註冊 2006-3-24
來自 美國滴滴尼
狀態 離線

 
 
 
 
發表於 2008-7-12 09:53 PM  資料  個人空間  短訊  加為好友 
Does your assignment require you to set the background using frame/frameset?  The proper way to set background image and its style is to use CSS styles.  Your original idea of using the background attribute would work, but like you said, it will repeat the image and fill up the whole page.  But if you do the following then it won't:

<body background="nice.gif"
          style="background-repeat: no-repeat; background-position: top"></body>


頂部

快速美言
           


當前時區 GMT+8, 現在時間是 2024-11-27 03:08 AM

    Powered by Discuz!  © 2001-2007 Comsenz Inc.   
Processed in 0.020644 second(s), 9 queries

清除 Cookies - 聯繫我們 - LIPS Corner 新天藍 - Archiver