I've created a simple webpart to show the weather forecast and I need to put it into a wiki page. The thing is: it works perfectly on a webpart page, but inside a wiki it is shown like it doesn't have css, everything it out of place. When I go to the designer, I can put it on the bottom placeholder and it works, but if I put it on the top one, the PlaceHolderMain and click save, it doesn't work, it simply erases my webpart warning me of unsafe content. By the definition of the site I'm working with I can't put it into the bottom, it must be inside the PlaceHolderMain. HELP ME!!!
|
|
I have a question if you dont mind? if you have created a custom webpart why dont you add the css sepratly? surely the css could be added to 12Hive or 14Hive? so in your webpart you have a testbox or label and add a cssClass attribute to it like so
now add your custom css class file to 12hive in the following location:
or in your webpart in visual studios goto your solution explorer on the right, create a new folder within the project called "12" within 12 a new folder "templates" within templates a new folder "LAYOUTS"...... you get the message you basicly need to recreate the folder directory where you want to store the css class and add the css file into that final folder within the project. when you deploy the wsp (webpart) it will navigate to the selected folder location and put in the css class for you :) so you dont have to touch 12hive what is best left alone ;) go back to your webpart and add this in the creatChildControls event to call upon the css class:
in your css (styles.css)
bingo :) |
|||||
|
