Image Size

  • Thread starter Thread starter Dick Jia
  • Start date Start date
D

Dick Jia

I try to write perfect XHTML code in FrontPage 2002, but FrontPage keeps
adding "width="xxx" height="xxx"" every time I manually remove it in HTML
view. It's waste of bytes for file, and because of that, I can't have
perfect XHTML code. Don't tell me to use css, because all pictures are in
different sizes. I just don't want to define the size. Can anyone tell me
how to stop FrontPage from doing this? Thanks a lot!

Dick Jia
 
Under image properties, appearance tab, uncheck the height and width tags.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Thanks. They are unchecked already, but FrontPage still gives width and
height in HTML code. It seems that every time I go to Normal view, FrontPage
will put these codes back even though the check mark in properties is
unchecked.
 
Do you have FP set to not modify HTML under Tools | Page Options | HTML
Source?

If the above is set, then remove the height and width tag from HTML view.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Yes, I have Preserve Existing HTML checked from the beginning, but it will
not solve the problem. Thanks again.
 
I don't have this problem, but try removing the height and width tag in HTML
View and also save this the page while in HTML View.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Yes, you are right, by saving page in HTML view, there is no problem. But
remember I said FrontPage will add weight and height for image next time I
open the page in Normal view. I don't want to remove the weight and height
every time I edit my old pages. Is there a way to open pages in HTML view
instead of Normal view in FrontPage?

You said you don't have the problem, but try these steps:

1. create a new page in Normal view, and insert a picture.
2. remove the height and weight in HTML view, and save it.
3. close this file, and reopen it, now you are in Normal view, right? Go to
HTML view, you will see weight and height are back.

It's really annoying.

Thank you for your help. I guess I will use other software, or Notepad, if
there is no solution for this problem.

BTW: I searched on the Internet, and found out it is a bug in FrontPage. You
can check this out, it's in Lesson 20, near bottom:
http://www.ex-astris-scientia.org/misc/frontpage.htm

Dick Jia
 
Are you using FP2002?

If so, I don't have access to my PC with FP2002, as I prefer to use FP2000
for development. I am sure someone by tomorrow will be able see if they can
duplicate this for you, if you are running FP2002.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
For me it works just like Dick describes in FP2002. I can't find any
way to not have FP insert the width and height tags.
 
Ok, then that sound like it is a bug.

One solution would be to surround the image tag as follows after removing
the width and height tags:

<!--webbot bot="HTMLMarkup" startspan -->
<img border="0" src="../images/Discover.jpg">
<!--webbot bot="HTMLMarkup" endspan -->

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
And what makes you think image attributes are not XHTML compliant?
See
http://www.w3.org/TR/xhtml1/
And
http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#edef-IMG

--



| I try to write perfect XHTML code in FrontPage 2002, but FrontPage keeps
| adding "width="xxx" height="xxx"" every time I manually remove it in HTML
| view. It's waste of bytes for file, and because of that, I can't have
| perfect XHTML code. Don't tell me to use css, because all pictures are in
| different sizes. I just don't want to define the size. Can anyone tell me
| how to stop FrontPage from doing this? Thanks a lot!
|
| Dick Jia
|
|
 
Also, without specific image dimensions maybe a case of
being penny wise and pound foolish- adding parameters for
images should help your pages render faster as browsers
will know how much space to block out for them on the page.
To me that's more important than shaving a few bytes off
the code.
 
Back
Top