1

I have Windows 7 64-bit computer and using Microsoft Expression Web 4.

I created a page in Microsoft Expression Web. In it I use :before CSS to show a red asterisk. But in the Design View of Microsoft Expression Web, the red asterisk never shows up. Only when I save the page and preview it in a web browser then the red asterisk shows up.

This is the CSS:

div.form_control span.label_mandatory
{
       color: Gray;
       float: left;
       font-size: medium;
       font-weight: normal;
    margin-left: 7px;
    line-height: normal;
       overflow: hidden;
       text-align: right;
       white-space: nowrap;
       width: 138px;
}

div.form_control span.field_mandatory:before
{
    color: Red;
    content: '*';
    font-weight: normal;
    margin-left: -7px;
}

div.form_control span.field_mandatory
{
    font-size: medium;
    font-weight: normal !important;
    margin-left: 10px;
    text-align: left;
    width: 50px;
}

This is the HTML:

<table width="100%">
<tr>
  <td>
    <div class="form_control">
      <span class="label_mandatory">English Description</span>
      <span class="field_mandatory">Dental QC (TB)</span>
    </div>
  </td>
</tr>
</table>

So why the Design View cannot show the effect of :before CSS? What I need to do so that the Design View can show it right away?

The page is telling me it is using CSS 2.1.

Thanks

srh
  • 1,661
  • 4
  • 30
  • 57
  • I've never used this product but it may be strictly evaluating the pseudo-element selector. In CSS2 `:before` and `:after` were named just like that, but the Selectors Level 3 documentation prefixes them with two colons as `::before` and `::after`. It should, however, also handle the single-colon syntax as per the specification, but perhaps it doesn't. – James Donnelly Apr 03 '17 at 11:33
  • @James Donnelly: The CSS3 syntax wasn't supported until Expression Web 4 SP1. If the service pack somehow removes support for the CSS2 syntax, well, that's one more reason not to use the cursed thing anymore, especially in this day and age. (It's like the FrontPage days, except worse.) – BoltClock Apr 03 '17 at 15:05
  • @BoltClock which one I should use instead of Expression Web / FrontPage? – srh Apr 04 '17 at 13:52

0 Answers0