Making FP more CSS savvy

B

Brett...

CSS is pretty well supported in FP these days but I'd like to know if it is
possible to set an option that forces FP to use styles?

eg:
When I highlight text and set a Font attribute I don't want lots of
<font face="Arial">!!!!</font>

I want:

<style>
<!--
..font1 { font-family: sans-serif }
-->
</style>
<p class="font1">help</p>
 
M

Murray

Create your styles first, and only use FP when you have to apply a custom
class - otherwise, just let the rules cascade into the page's elements
normally.
 
W

Wally S

If the styles are there, FP will use them. Instead of setting a font
attribute, just select the class from the drop-down menu. But you have to
create the styles first.

Wally S
 
P

p c

That's the problem. In general, do not use FONT to set the style of
text. FP likes to use the Font tag when you choose the Format option but
the FONT tag is deprecated in HTML 4 and XHTML in favor of stylesheet,

Best option: create an external stylesheet and apply to all or most of
your pages on the site, this way you can change the look of the pages at
a single place. Then to fine tune the look of a page, you can use
internal style tags or style attributes. And the Font tag as last resort.

Which means you may want to learn CSS and get comfortable with changing
the HTML of a page. But not to worry, there are plenty of tutorials on
the NET and books at bookstores if you want to look for them.
 
B

Brett...

Yes I understand this. I just think it would be better to have an option
within the font dialogue box to use styles. In fact I would go further and
suggest that the option to use styles were set as default.

Brett
 
B

Brett...

Indeed, the current way of doing things actually puts off users from using
styles.
Which is what I was getting at with my original question.
What SHOULD happen (even if set by an option) is that selecting a font
should create and use the appropriate style.

Brett
 
T

Thomas A. Rowe

Selecting a font should not set a style, because a font has nothing to do with styles. Styles can
however set the font, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
K

Kevin Spencer

Yes I understand this. I just think it would be better to have an option
within the font dialogue box to use styles. In fact I would go further and
suggest that the option to use styles were set as default.

I agree. I believe Microsoft is moving in that direction. Let's hope so!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
 
W

Wally S

You don't need an option. It's already there. If you want to set a default
font, then put this at the top of your style sheet:

body {font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:
100%; background-color: White;}

FP will automatically follow this. Of course, you can put whatever font,
size, and background you want. If you want a special font for a special
purpose, then create a class for it and assign the class where you want it.

The font dialog box cannot assign a style because it does not know whether
you want to use it as a default, as a class, or as an ID. There are too
many variables. In fact, I eventually stopped using the font-dialog box
altogether. I really do not see how it could be simpler.

Wally S
 
B

Brett...

The point I am making is that you shouldn't NEED to do this.
There is no reason why the UI cannot be designed to allow a range of options
that are CSS aware.
In fact I am suggesting that they should be the default.
In this way the font option box can become useful again rather than just
wasting space on your toolbar.

Brett


Wally said:
You don't need an option. It's already there. If you want to set a
default font, then put this at the top of your style sheet:

body {font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 100%; background-color: White;}

FP will automatically follow this. Of course, you can put whatever
font, size, and background you want. If you want a special font for a
special purpose, then create a class for it and assign the class
where you want it.
The font dialog box cannot assign a style because it does not know
whether you want to use it as a default, as a class, or as an ID. There
are too many variables. In fact, I eventually stopped using the
font-dialog box altogether. I really do not see how it could be
simpler.
Wally S
 
T

Thomas A. Rowe

How can selecting a font, set a style?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
K

Kevin Spencer

Hi Tom,

Currently, FrontPage uses font tags and attributes to set fonts and font
"styles" inline. Alternatively, when you select a font and its various
charactersitics, a style tag could be added, or a style set in a style sheet
(either internal or external), which would use a CSS style for the font.
Example, using a style sheet and a CSS class called "normal":

..normal
{
font-family: Arial;
color: #000000;
font-weight: normal;
font-size: 10pt;
}

By putting this into a style sheet, any text could have this set of font
characteristics assigned to it, using a span tag:

<span class="normal">This is some normal text.</span>

Or, you could set a default for any paragraph:

p
{
font-family: Arial;
color: #000000;
font-weight: normal;
font-size: 10pt;
}

Anything in a <p> tag would have the style applied:

<p>This is some normal text.</p>

W3C Standards are moving increasingly towards styles rather than attributes,
especially with regards to XHTML (See http://www.w3.org/TR/xhtml1/). Of
course, the XHTML Transitional DTD includes the font tag, but the Strict DTD
does not. This indicates that the font tag is going to go away, in favor of
using all CSS for formatting.

This is a good thing. Over the years, as HTML was not designed for
extensibility, the HTML standard specification has grown increasingly
complex and difficult to work with. XHTML is an "HTML flavor" of XML, which
is almost infinitely extensible. One of the nicest things about CSS is that
rather than having an increasing assortment of tags and attributes, only one
attribute (the style attribute) is needed, and the formatting can easily be
separated from the content. One of the greatest things about XML is that it
can be easily transformed from any format to any other format using XSL.
Hence, the upcoming XML standard for all Microsoft Office documents.

Yes, it will require a little bit of adjustment in the short run, but the
rules for XML are really quite simple, and in the long run, it will be much
easier to work with web pages, transform from Office format to web format
(and back again), and make web pages look the same in any browser.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

Thomas A. Rowe said:
How can selecting a font, set a style?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Brett... said:
It can. I am arguing the case for a user interface that is driven by
styles!


Brett
 
T

Thomas A. Rowe

I have more control over assigning font to specific block of text then via CSS. If you need to
change a specific section of text, you have to either modify the style tag or you have to create new
one, if you only need to do it for a specific block of text, this takes more time and effort then
just selecting the text and assign the font, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Kevin Spencer said:
Hi Tom,

Currently, FrontPage uses font tags and attributes to set fonts and font "styles" inline.
Alternatively, when you select a font and its various charactersitics, a style tag could be added,
or a style set in a style sheet (either internal or external), which would use a CSS style for the
font. Example, using a style sheet and a CSS class called "normal":

.normal
{
font-family: Arial;
color: #000000;
font-weight: normal;
font-size: 10pt;
}

By putting this into a style sheet, any text could have this set of font characteristics assigned
to it, using a span tag:

<span class="normal">This is some normal text.</span>

Or, you could set a default for any paragraph:

p
{
font-family: Arial;
color: #000000;
font-weight: normal;
font-size: 10pt;
}

Anything in a <p> tag would have the style applied:

<p>This is some normal text.</p>

W3C Standards are moving increasingly towards styles rather than attributes, especially with
regards to XHTML (See http://www.w3.org/TR/xhtml1/). Of course, the XHTML Transitional DTD
includes the font tag, but the Strict DTD does not. This indicates that the font tag is going to
go away, in favor of using all CSS for formatting.

This is a good thing. Over the years, as HTML was not designed for extensibility, the HTML
standard specification has grown increasingly complex and difficult to work with. XHTML is an
"HTML flavor" of XML, which is almost infinitely extensible. One of the nicest things about CSS is
that rather than having an increasing assortment of tags and attributes, only one attribute (the
style attribute) is needed, and the formatting can easily be separated from the content. One of
the greatest things about XML is that it can be easily transformed from any format to any other
format using XSL. Hence, the upcoming XML standard for all Microsoft Office documents.

Yes, it will require a little bit of adjustment in the short run, but the rules for XML are really
quite simple, and in the long run, it will be much easier to work with web pages, transform from
Office format to web format (and back again), and make web pages look the same in any browser.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
 
B

Brett...

Sorry but that is nonsense. CSS offers much more power and efficiency in
terms of file size than using lots of deprecated <font> tags!
FP2003 might not be as intuitive to use in this way and I agree. In fact
this is where I came in.

Brett
 
T

Thomas A. Rowe

How is it nonsense just because I feel that I have more control using font tags, and you feel that
you have more control using CSS, this is a individual choice that we are each free to make, and as
long as browsers continue to support the font tags and other tags, I see no benefit in changing.

FYI: I do work with sites that use CSS for specifying fonts.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
K

Kevin Spencer

and as long as browsers continue to support the font tags and other tags,
I see no benefit in changing.

Well, Tom, there's my point. This support will not continue forever. It may
last another 5 years at the outside, I would guess. In fact, HTML will be
deprecated in another few years, in favor of XHTML. So, if you want to make
all those changes when it becomes necessary, that's your prerogative. I
would personally prefer to migrate gradually by doing all my newer work
along the more standard lines. This also seems to be the direction in which
Microsoft is heading.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

Thomas A. Rowe said:
How is it nonsense just because I feel that I have more control using font
tags, and you feel that you have more control using CSS, this is a
individual choice that we are each free to make, and as long as browsers
continue to support the font tags and other tags, I see no benefit in
changing.

FYI: I do work with sites that use CSS for specifying fonts.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Brett... said:
Sorry but that is nonsense. CSS offers much more power and efficiency in
terms of file size than using lots of deprecated <font> tags!
FP2003 might not be as intuitive to use in this way and I agree. In fact
this is where I came in.

Brett
 
T

Thomas A. Rowe

Kevin,

Old browsers will continue to be used, as older PC are donated, etc. and this will last more then 5
years, also with the number of web sites currently on the internet, many will never be updated, as
they contain archive type of content, so the browsers will always need to support the viewing of
these site.

Microsoft has also learned that they still have to allow applications such as Word to still
read/open older Word documents.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

Kevin Spencer said:
and as long as browsers continue to support the font tags and other tags, I see no benefit in
changing.

Well, Tom, there's my point. This support will not continue forever. It may last another 5 years
at the outside, I would guess. In fact, HTML will be deprecated in another few years, in favor of
XHTML. So, if you want to make all those changes when it becomes necessary, that's your
prerogative. I would personally prefer to migrate gradually by doing all my newer work along the
more standard lines. This also seems to be the direction in which Microsoft is heading.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top