[Pro] XHTML Strict and Tables?

If you are referring to this

<!-- Begin Menu drop shadow code -->
<style type="text/css">
.sub {
-webkit-box-shadow: #000000 3px 3px 5px;
-moz-box-shadow: #000000 3px 3px 5px;
box-shadow: #000000 3px 3px 5px;
}
ul.sub, ul.sub li.fwLastChild, ul.sub li.fwLastChild a {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
</style>
<!-- End Menu drop shadow code -->

Then you could add Walter’s extra style in there

<!-- Begin Menu drop shadow and extra Table styling code -->
<style type="text/css">
.sub {
-webkit-box-shadow: #000000 3px 3px 5px;
-moz-box-shadow: #000000 3px 3px 5px;
box-shadow: #000000 3px 3px 5px;
}
ul.sub, ul.sub li.fwLastChild, ul.sub li.fwLastChild a {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
#myTable td {
border-bottom: 1px solid #ccc;
}
#myTable tr.extra td {
padding-bottom: 20px;
}
</style>
<!-- End Menu drop shadow and extra Table styling code -->

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This should just work, as long as your table is named myTable in the Title field of the Inspector when that table is selected (all corner handles showing). If it isn’t named that, then either change the name or the CSS so they both match up.

Walter

On Sep 30, 2012, at 6:24 PM, DeltaDave wrote:

If you are referring to this

<!-- Begin Menu drop shadow code -->
<style type="text/css">
.sub {
-webkit-box-shadow: #000000 3px 3px 5px;
-moz-box-shadow: #000000 3px 3px 5px;
box-shadow: #000000 3px 3px 5px;
}
ul.sub, ul.sub li.fwLastChild, ul.sub li.fwLastChild a {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
</style>
<!-- End Menu drop shadow code -->

Then you could add Walter’s extra style in there

<!-- Begin Menu drop shadow and extra Table styling code -->
<style type="text/css">
.sub {
-webkit-box-shadow: #000000 3px 3px 5px;
-moz-box-shadow: #000000 3px 3px 5px;
box-shadow: #000000 3px 3px 5px;
}
ul.sub, ul.sub li.fwLastChild, ul.sub li.fwLastChild a {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
#myTable td {
border-bottom: 1px solid #ccc;
}
#myTable tr.extra td {
padding-bottom: 20px;
}
</style>
<!-- End Menu drop shadow and extra Table styling code -->

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, that works but it’s applied to all rows. How do I apply it to select rows?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I think I need a class based style like Walter mentioned earlier. I’m reading up on this now on page 220 of the FW5 Reference Manual.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I meant 226.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, I got the rule to work using the extended code Walter referenced below. Thanks! I also tried setting up a style, naming it “rule” and using the same extended code but that didn’t work, so I must be misunderstanding something.

On 30 Sep 2012, 5:46 pm, waltd wrote:

If you want to add a quick underline to one cell of a table (not all of the cells) you could use the Inspector. Choose the cell with a single-click, and look in the first tab of the Inspector. You’ll see options for the row, column, and current cell. Clicking Extend in any of these, you can add a border by entering the following (after pressing New in the dialog):

  • Name: style
  • Value: border-bottom: 1px solid #ccc

You could substitute border-right or -left or -top if you like, and the colors can be anything you need for your design, naturally. There are about 7 different styles for a border, but most of them require a width greater than 1px for them to look like anything useful.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, that works but it’s applied to all rows. How do I apply it to select rows?

Yes as per Walters previous post you need to apply a class - in my code above the class was ‘extra’

The name is irrelevant as long it is referenced correctly in the Markup.

A URL to your current workings will help see where it is going wrong for you.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So add a class style and then add the extended code, correct?

I’ll post an updated page as soon as I can. BTW, what the difference between tag styles and class styles (if that’s the right terminology)?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

In Freeway, when you make a new style there are two inputs at the top of
the window - Tag and Name. When you type your style name into the Name
input, the resulting style is a Class style. You see it appear in the FWP
stylesheet as

.thenameyouchose { color: red; }

and then where it is applied to elements on the page as

<div class="thenameyouchose" - or - <p class="thenameyouchose" - etc

Classes are a type of selector you can make up to identify an element or
groups of elements. FWP only publishes class styles that are actually used
on your page.

When you type your style name into the Tag field of Freeway Pro’s Style
Editor, FWP creates a different kind of style. With Tag styles, you can’t
just ‘make up’ names like with Class styles - the style name must match an
exact html element or expression - like div or h1 or p. In fact, the
element name (or “tag”) that you set in a Tag style is the element that the
style is supposed to target. So if you wanted to target all p elements,
you’d name it p (Freeway creates this one automatically). If you wanted
target a tag’s id (the name we gave it in FWP) you’d use the hash tag like
this

#nameyougaveit

Tag names can be complex, but it’s just syntax – another way of saying
something you already know. Like

ul#menu li a:hover

is just a way of saying “Target the mouseover state of all anchor tags
placed on list items belonging to the unordered list whose id equals
‘menu’.” You don’t apply Tag styles to page elements like you do class
styles in FWP - their names tell them where to apply the style. However, be
careful when creating Tag styles in FWP as it will not tolerate bad
spelling or syntax - and will annoyingly insist on trying to add a class
name.

While Freeway Pro does not publish Class styles that it thinks aren’t
applied to a page, it always publishes the Tag styles. If you have applied
a class attribute somewhere on the page in extended markup, FWP won’t see
it and will not publish the associated class style you’ve made for it.
However, if you create your class style in the Tag input, FWP will be
forced to publish it. The downside is the Tag input is very exacting - nor
bad spelling or syntax allowed.

There’s more on the web about CSS, Selectors, and HTML Elements.


Ernie Simpson

On Mon, Oct 1, 2012 at 1:05 PM, RavenManiac email@hidden wrote:

So add a class style and then add the extended code, correct?

I’ll post an updated page as soon as I can. BTW, what the difference
between tag styles and class styles (if that’s the right terminology)?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

But, some of my styles, such as “h1, h2, p” are tags with no names, and others are simply names with no tags. I recall that Todd had me setup a tag named “textarea” to stylize Perch data entry boxes in a contact form. Why wouldn’t a named style (class?) have worked there?

I’m just trying to understand why you would use one over the other? Thanks Ernie.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

When you construct a selector (the part of a CSS rule outside of the curly-braces), there are some basic elements that you will use: tags, classnames, IDs, and pseudo-classes.

Tag styles are written using one of the many HTML tag elements: h3, p, ul, div… Class styles are written with a leading dot: .yummy. ID styles are written with a leading #: #PageDiv. The “pseudo-class” styles are written with a leading colon, and are almost always seen in the company of their tag name: a:hover or input:checked for example. These selectors refer specifically to things that can change after the page is loaded – intermediate style changes to reflect the user’s input through the mouse or another cursor analogue.

Freeway attempts to hide some of the complexity of CSS selectors from you, so instead of adding a dot in front of the text value to make it a classname, you type the classname text into the Name field and Freeway adds the dot.

IDs are not exposed at all, I suppose because that’s too geeky for the target audience.

In the Tag field, there’s two possible things going on. At the most basic, you can choose one of the cardinal HTML tag element names from a combo-box picking list. But if you take care to empty out the Name field of any auto-entered “style42” type text, you also get the expert interface for Freeway’s style generator. I go into some length about this on ActionsForge: http://actionsforge.com/articles/view/9-tag-only-styles

In vanilla CSS, there’s no difference between any of these approaches besides the specificity of the selector. You may create a selector using all or any of the following: tag name, class name, id, “pseudo-class” behavior attributes. They are variously more specific than one another, and when you combine them, they become even more specific.

All other things being equal, an ID-based rule will be more specific than a class-based rule, simply because there can only ever be one item on a page with a given ID, and there can be many with the same classname (or tag, for that matter).

If you stack up selectors:

nav ul li a { /* some style here */ }

you get a rule that applies only to a tags that are the children of an li that is the child of a ul that is the child of a nav. That’s pretty specific. But if you wanted a rule that only applied to those elements (and didn’t change the appearance of links inside of other lists on the same page) then you might need to go that deep in the selector-fu to target only the ones you needed.

There are also combination operators: > means a direct child, + means directly following. Here’s an example of the difference:

<div id="foo">
	<p>text here</p>
	<p id="bar">text here</p>
	<p>text here</p>
	<div>
		<p>text here</p>
	</div>
</div>

With the following style rules:

#foo p { color: black; }
#foo > p { color: red; }
#bar + p { color: blue; }

The first two lines would be red (direct children of #foo that are p tags get that color), the third would be blue (the p that directly follows #bar is blue) and the last one would be black (default for all p tags anywhere inside of #foo). The order of the rules in your stylesheet is important, too, because if you move #foo p to the bottom of the list of styles, all of the text turns black. These rules are very similar in terms of their specificity, because the combination operators don’t count toward the rule’s total score. If you added

#foo div p { color: green; }

to the mix, that nested p would be resolutely green no matter where you moved the styles, because having two tag selectors and one ID overpowers those having one ID and one tag.

I could go on about this for days, hope this gets you started.

Walter

On Oct 1, 2012, at 1:05 PM, RavenManiac wrote:

So add a class style and then add the extended code, correct?

I’ll post an updated page as soon as I can. BTW, what the difference between tag styles and class styles (if that’s the right terminology)?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m just trying to understand why you would use one over the other? Thanks
Ernie.

CSS is versatile - there are always several ways to do anything, so you are
free to choose what suits you.

Freeway Pro is somewhat robotic, it writes code without thinking about the
alternative ways to achieve it. If you create a Class style for red text

.redtext { color:red; text-align:left }

FWP would turn every bit of text you applied this to red. But it would do
it rather inefficiently by adding the class selector to every single block
of text you chose - which is also an inefficient way for you to work. Some
Freeway page code can be a mess that is impossible for a human to detangle…
and that is why a lot of us learn html and css in the first place, to
unravel what is going on and make it work the way we want.

You can learn to make the robotic Freeway behave differently, and give you
something closer to what you want. If you don’t want excess and
un-necessary code (which, btw, still works fine) you could apply our red
class style to an HTML item and unless otherwise contradicted would turn
all the text in that box red too. Or, if you were to apply the style as a
Tag style to the body tag, then all the text on your page will be red, with
just one rule. Freeway may be robotic, but that makes it predictable as
well. Once you know the code you want produced, there almost always is a
way to get it to work for you.

Almost.

Remember that CSS is kinda layered - this is what we call the Cascade. All
the style rules we make are like dominoes, and every rule we create can be
superseded down the line. Like saying, “Follow this rule, until you get to
here – then, something else!” You can be creative with how you solve your
design problems with it.

Lol, I bet this is confusing. As it was for us too - and sometimes still
is.


Ernie Simpson


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No, you explained it really well.

So in other words, in FWP, if I select the Style Selector in the Inspector, each section (i.e. page, item, text, etc.) from the bottom to the top supersedes the previous in terms of how the computer processes the code, hence cascading effect.

Is that correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not entirely correct. Each type of selector has a natural “weight” to it. All other things being equal, an ID is more valuable than a tag or a class, for example.

#foo
.foo
p

But start to combine them, and the ranking changes:

#foo
p.foo
.foo

or

p#foo
#foo
.foo

Further to this, if your style selector combines elements, reflecting the nested nature of most HTML, you can reach into the ship in a bottle with tweezers and only adjust the mizzenmast.

The other part of the cascade that Ernie alluded to is that each tag inherits from its parent. A very simple HTML page like this:

<html>
<head><title>Hello World</title></head>
<body>
	<div id="PageDiv">
		<h1>Hello World<h1>
		<p>Some text here to describe it.</p>
		<p class="foo">Something else here.</p>
	</div>
</body>
</html>

…could set a basic style on the body:

body { background-color: #fff; color: #333; }

and every other element on the page would inherit those properties. This would be a very weak attribute – like how you can’t really feel the pull of gravity from Jupiter in your daily life – but it’s there. Setting a color attribute on the p tag would add a different color to all Ps. But setting a different color attribute on p.foo (or just .foo – that’s still more specific than just the tag) would override the second sentence and make it a different color.

There’s lots more detail to explore here. It sounds like you’re ready to take that first step.

Walter

On Oct 1, 2012, at 2:56 PM, RavenManiac wrote:

No, you explained it really well.

So in other words, in FWP, if I select the Style Selector in the Inspector, each section (i.e. page, item, text, etc.) from the bottom to the top supersedes the previous in terms of how the computer processes the code, hence cascading effect.

Is that correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

For the record, Ernie Simpson adjusts his bottled-ship mizzenmasts with a 70hp chainsaw.

:slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, guys. Here’s the latest. I got the rules to work, but I can’t figure out how to add padding to select rows. I know I need to setup a class called extra, but do I just leave the class style blank?

XHTML 1.0 Strict http://www.williamsburgmemorialpark.com/properties/test.html


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

See if this helps http://www.deltadesign.co/fw_examples/CSSstuff/tablestyling.html

Note that I have not created a class called extra or padding in the style editor - just added the class names to the rows. The definition for the styles is added in the Page>HTML Markup.

The cells are actually all the same height of 40px in FW design view but the rendered page adds the extra 20px to those with the class:padding

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

David, yes that helps quite a bit. However, even with using your instructions, padding is not working. Please revisit the link above to see the latest update.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Which row have you added padding to

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK - I see it add the !important declaration to it as it is getting overwritten by another style

padding-bottom: 20px !important;

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options