If the dynamic ID follows some particular pattern you can select it using attribute selectors.
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors
For example:
<div id="dynamic12afadsf34"> .... </div>
You can select this with 'div[id^=dynamic]' which is select the div that has an attribute id that begins with dynamic.
You might also be able to select the element by selecting its parent and using > to get its direct children. This is the same as Corrinna's response above: '#oneup-header > div.controls > ul'
You might even need to use a combination of these two methods. If you post the source that you're working with, we can offer some more guidance.