Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Aug 20, 2017 4:16 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Styles: Classes and subclasses
PostPosted: Tue Mar 05, 2013 12:10 pm 
Offline

Joined: Fri Feb 12, 2010 1:32 pm
Posts: 228
Location: Switzerland
Hey,

How can I apply a style to a whole group of HTML elements instead of just an element (#id)? ( ul { styles...}
Furthermore - how can I apply styles to nested HTML elements? Example

<ul>
<li> Level 1 </li>
<ul>
<li> Level 2 </li>
</ul>
</ul>


When working in HTML/CSS directly, we'd do " ul ul {styles of level 2}"

Best,
Alex


Top
 Profile  
Reply with quote  
 Post subject: Re: Styles: Classes and subclasses
PostPosted: Tue Mar 05, 2013 2:47 pm 
Offline
Real Software Engineer

Joined: Tue Jul 14, 2009 4:33 pm
Posts: 146
Location: Raleigh, NC
Your style should be something like:

#YourControlID ul ul {
...style definition...
}

_________________
Greg O'Lone
Software Engineer
Real Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Styles: Classes and subclasses
PostPosted: Tue Mar 05, 2013 3:13 pm 
Offline

Joined: Fri Feb 12, 2010 1:32 pm
Posts: 228
Location: Switzerland
So I'd write:

style(0).selector=self.ControlD + " ul ul"


correct?


Top
 Profile  
Reply with quote  
 Post subject: Re: Styles: Classes and subclasses
PostPosted: Tue Mar 05, 2013 4:58 pm 
Offline
Real Software Engineer

Joined: Tue Jul 14, 2009 4:33 pm
Posts: 146
Location: Raleigh, NC
Almost:

style(0).selector= "#" + self.ControlD + " ul ul"

_________________
Greg O'Lone
Software Engineer
Real Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Styles: Classes and subclasses
PostPosted: Tue Mar 05, 2013 5:00 pm 
Offline
Real Software Engineer

Joined: Tue Jul 14, 2009 4:33 pm
Posts: 146
Location: Raleigh, NC
Wait...

You can't change the selector of style(0). You'll need to create a new style and append it to the styles array.

_________________
Greg O'Lone
Software Engineer
Real Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Styles: Classes and subclasses
PostPosted: Wed Mar 06, 2013 3:11 am 
Offline

Joined: Fri Feb 12, 2010 1:32 pm
Posts: 228
Location: Switzerland
Ahhh, there we go. Thousand thanks Greg!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group