# Apply classes and IDs to unordered lists

**URL:** <https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199>\
**Category:** Freeway\
**Created:** [February 14, 2011, 1:57am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199 "2011-02-14T01:57:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [February 14, 2011, 1:57am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/1 "2011-02-14T01:57:55Z")

</div>

How can I apply IDs and classes to unordered lists in FW

What I want to achieve is

```auto
<ul id="myID">
<ul class="someclass">

```

Not necessarily on the same ul

David

* * *

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

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [February 14, 2011, 2:02am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/2 "2011-02-14T02:02:41Z")

</div>

You can’t. But you can work around it by wrapping your list in a DIV, and then using that DIV’s ID in a compound selector like `#yourDiv ul`. Weaver wrote an Action that allows you to add classnames to individual list items:

[http://www.actionsforge.com/actions/view/122-list-item-styler](http://www.actionsforge.com/actions/view/122-list-item-styler)

Walter

* * *

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

---

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [February 14, 2011, 2:18am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/3 "2011-02-14T02:18:04Z")

</div>

Thanks Walter - that action is just what I am looking for.

I did have it, I just didn’t know I needed it until now.

D

* * *

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

---

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [February 14, 2011, 2:27am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/4 "2011-02-14T02:27:43Z")

</div>

OK - next question

FW produces this

```auto
ul class="f-fp f-lp">

```

Can you explain what this really means in FW

D

* * *

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

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [February 14, 2011, 3:36am UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/5 "2011-02-14T03:36:20Z")

</div>

Sure. f-fp means First Paragraph (which gets top-margin:0) and f-lp  
means Last Paragraph (which gets bottom-margin:0). Usually these get  
applied to the P tags inside a DIV, so the measurements you set for  
padding will work predictably. I suppose the same thing is being done  
to the UL, for the same reason.

Remember you can add as many classes to an object as you like, in a  
space-delimited list inside the class attribute. They apply in order,  
so if you added another class later in the list that reset the  
margins, it would apply without the need for !important or any other  
hacks.

Walter

On Feb 13, 2011, at 9:27 PM, DeltaDave wrote:

> OK - next question
> 
> FW produces this
> 
> ```auto
> ul class="f-fp f-lp">
> 
> ```
> 
> Can you explain what this really means in FW
> 
> D
> 
> * * *
> 
> freewaytalk mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

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

---

<div class="post-metadata">

**Author:** ![David\_McCallum](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@David\_McCallum](https://discourse.softpress.com/u/David_McCallum)\
**Post date:** [February 14, 2011, 7:30pm UTC](https://discourse.softpress.com/t/apply-classes-and-ids-to-unordered-lists/10199/6 "2011-02-14T19:30:18Z")

</div>

Thanks Walter - I will get the hang of this eventually.

D

* * *

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