This project is read-only.

CSS Problem in Widget Zone

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
May 8, 2017 at 8:59 PM
I have a bio pic in the widget zone, just under the search box. It has a CSS inline border defined in the following file:
As follows:
<?xml version="1.0" encoding="utf-8"?>
    <DictionaryEntry Key="content" Value="&amp;lt;p&amp;gt;&amp;lt;img style=&amp;quot;padding: 1px; background-color: #525252; border: 1px solid #ccc;&amp;quot; src=&amp;quot;/Custom/Themes/Standard/images/bio_pic.jpg&amp;quot; alt=&amp;quot;Anthony&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;" />
It generates the following markup:
<div class="widget textbox">
        <img style="padding: 3px; 
            background-color: #525252; 
            border: 1px solid #ccc;" 
            alt="Anthony" />
Even when I remove the styling from the XML file, it has no effect. I tried adding a custom style rule to the main CSS file, to no avail. Can someone please help me make sense of this mess? I would much prefer to not have inline CSS but nothing I tried seems to work.
May 9, 2017 at 5:27 AM
Hey Anthony,

The styling must have been added when the image was first added to the widget. I just tried doing this myself with 3.3.5 and got the following:
<?xml version="1.0" encoding="utf-8"?>
    <DictionaryEntry Key="content" Value="&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&#xD;&#xA;&amp;lt;p&amp;gt;&amp;lt;img src=&amp;quot;/custom/themes/PBSB-wide/src/img/logo.png&amp;quot; alt=&amp;quot;Simon&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;" />
(The HTML is being stored in a Dictionary, which is just a way of storing and retrieving data easily (at least if you're a computer))

The easiest way to fix this would be to edit the image in the widget. Editing the XML file will also work, but it's like doing it in hero mode :-)

I think the app will need to be restarted to make it pick up the changes.

Marked as answer by AnthonyGrace on 5/9/2017 at 8:07 AM
May 9, 2017 at 3:21 PM
Edited May 9, 2017 at 3:42 PM
Hi Simon,

I had moved away from this project for months so am trying to figure out what I was thinking! Apparently I was forced to add a bio pic to the widget zone because of the way this was designed (would have much preferred to work directly with regular markup in the master page).

It seems to be using a TextBox widget. When I try to edit it in admin, it's blank, as are the other widgets (using five). I can find no way to work with these in admin.

Since this is a "Web Site" ASP.NET template it is not using full IIS on my local - how do I stop and restart the server? And how can I edit the widget? I can see the live widgets in the "Widget Zone (be_WIDGET_ZONE), but as I said there is no markup in any of them, except for BlogRoll - Administration, Search and Category List, simply offer me the option of a name field.

When I open the TextBox one for the bio pic and click on "Formats", the drop down won't go back up again! I can't even add text or markup to it...

Any ideas? And thanks for your input!


I seem to have got it working by deleting the XML file then adding the widget again in admin. Thanks for your help :)