Is there a way to use CSS directly with a WebStyle?

I was trying to create a WebStyle, but there’s a number of css attributes that aren’t supported.

Is there a way to use CSS directly with a WebStyle?

No
The attributes that are there is whats there
You’d have to do “something completely different” to use raw css

Folks have been quite creative about this on the forums

I think I read somewhere here that you can create a new EMPTY style and call it something fancy like “mystyle”.
Then in App.Header you can create the tag and add .mystyle (don’t forget the dot) there to add things to it.

I should be sleeping right now so I might be mumbling… :stuck_out_tongue_winking_eye:

[quote=240343:@Tim Parnell]I was trying to create a WebStyle, but there’s a number of css attributes that aren’t supported.

Is there a way to use CSS directly with a WebStyle?[/quote]

Yes. You can add to a WebStyle CSS that it does not support. Here is how :

Add your CSS in App.HTMLHeader or in a page Source as such :

<style> .Style1 { } </style>

This will add to the WebStyle whatever is in between the braces. Note that the name of the WebStyle must be preceded by a dot.

Thanks for the workarounds guys.

I wish I had known this yesterday. Working on my first web project and spent a couple of hours rolling my own WebControlWrapper button class to use custom CSS :stuck_out_tongue:

It really is a complete mental shift working with web apps. Much harder than I thought. I am also finding that my navigator is much more crowded with all the discombobulation that comes with it.

All that being said, like desktop, it is just plain fun to create with Xojo :smiley:

[quote=240371:@Peter Fargo]I wish I had known this yesterday. Working on my first web project and spent a couple of hours rolling my own WebControlWrapper button class to use custom CSS :stuck_out_tongue:

It really is a complete mental shift working with web apps. Much harder than I thought. I am also finding that my navigator is much more crowded with all the discombobulation that comes with it.

All that being said, like desktop, it is just plain fun to create with Xojo :D[/quote]

It’s also nice that WebControlWrapper has an event to supply this content for the header. Makes the controls much easier to distribute to others and re-use.