Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi all,

    I wanted to send a complete HTML page to somebody for reviewing. Good thing I checked it before i sent it: I found that if the CSS file was not visible, then the HTML page was unformatted.

    So I tried inserting my CSS file inside the <Header> area of the MHT file. In IE7, I still don't get the formatting. In Opera, I get the formatting but the embedded icons don't come out. Re FF, I forgot. Anyway, is there any magic trick to enclose the CSS in the MHT file so that it comes out in all (ok, almost all) popular browsers?

    TIA

    - avi

  2. #2
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='amakeler' post='786363' date='27-Jul-2009 05:27']... is there any magic trick ...[/quote]
    I just tried on a sample page I randomly found and used the SAVE AS command in IE BUT I saved the file to my hard drive as "Web Page Complete."

    On my local drive copy the page looks fine, even in Firefox. As far as the sending goes, I don't know what you were planning but I would package all the files in a ZIP if it were me.

    You do realize that if there are links on the page, when the person opens the file on his local hard drive and THEN clicks on any links, he will be taken to the original page, NOT his hard drive. In other words, only the current page and its content and peripheral files are saved.

    [attachment=84868:2009_07_27_064433.png]
    Attached Images Attached Images

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    Al has effectively answered your question but it sounds like the web page has a linked CSS file, to confirm you can go to the raw code and look in between the head tags and see something similar to this:

    <link href="css/main.css" rel="stylesheet" type="text/css" />

    this will mean there is a file called main.css in a subfolder to the root called css. This will obviously be different to your site but indicates how to locate the file. If you want to save the web page in its entirity follow Al's instructions above however you will have to put the HTML file and the folder containing the images and CSS into another folder to allow you to zip it all up in one go.

    HTH
    Jerry

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='Bigaldoc' post='786370' date='27-Jul-2009 21:57']You do realize that if there are links on the page, when the person opens the file on his local hard drive and THEN clicks on any links, he will be taken to the original page, NOT his hard drive.[/quote]

    I was going to make a post to say that this is not always true, but (fortunately) I checked and found something that surprised me.
    With IE8, when you use "Save as Web Page Complete", all the relative paths in links are converted to full URLs, even if the link just points to a named anchor within the current document.

    So <A href="#Health"> gets saved as
    <A href="http://en.wikipedia.org/wiki/Dog#Health">
    Regards
    John



  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='johnhutchison' post='786378' date='27-Jul-2009 13:55']I was going to make a post to say that this is not always true, but (fortunately) I checked and found something that surprised me.
    With IE8, when you use "Save as Web Page Complete", all the relative paths in links are converted to full URLs, even if the link just points to a named anchor within the current document.

    So <A href="#Health"> gets saved as
    <A href="http://en.wikipedia.org/wiki/Dog#Health">[/quote]

    That is interesting John, are you aware why they have done this as it seems a bit counter-productive if you are saving it locally!
    Jerry

  6. #6
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='johnhutchison' post='786378' date='27-Jul-2009 08:55']With IE8, when you use "Save as Web Page Complete", all the relative paths in links are converted to full URLs ...[/quote]
    As near as I can tell, Firefox does the same thing, John. I did my test saves with both IE and Fx.

  7. #7
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='Jezza' post='786384' date='27-Jul-2009 09:18']That is interesting John, are you aware why they have done this as it seems a bit counter-productive if you are saving it locally![/quote]
    The only thing I can think of Jerry is the massive save you'd have to do in order to save all the content behind every link on a page. Wow, that would just about mean saving an entire domain...

  8. #8
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='Bigaldoc' post='786385' date='28-Jul-2009 01:19']As near as I can tell, Firefox does the same thing, John. I did my test saves with both IE and Fx.[/quote]

    Al
    When I save the same Wiki page with Firefox,

    <A href="#Health"> was saved as <A href="#Health">
    Regards
    John



  9. #9
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='Bigaldoc' post='786386' date='27-Jul-2009 14:23']The only thing I can think of Jerry is the massive save you'd have to do in order to save all the content behind every link on a page. Wow, that would just about mean saving an entire domain...
    [/quote]

    Good point Al, it obviously just saves to the next level down in the web structure so the references to the various media files such as the jpg, css etc will remain as referential links and the links to other pages will become absolute links. Hadn't really thought about it until now so quite a good post for discussion purposes.
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •