Coffeehouse Thread

24 posts

VS.NET 2005 - CSS issues

Back to Forum: Coffeehouse
  • User profile image
    phreaks

    Visual Studio fails to build due to some CSS errors.
    Why would CSS cause the solution to fail to build?

    Also, I stole this CSS from the MS AJAX sample, and that project builds just fine.

    Perplexed

    Error 4 'opacity' is not a known CSS property name. C:\Documents and Settings\RonJeremy\My Documents\Visual Studio 2005\WebSites\LAJAX\StyleSheet.css 428 2 C:\...\LAJAX\

    .popupMenu
    {
       position:absolute;
       visibility:hidden;
       background-color:#F5F7F8;
       opacity:.9;
       filter: alpha(opacity=90);
    }

    EDIT: whoops! I meant to post this in Tech-Off, my bad.

  • User profile image
    jsampsonPC

    Looks like it doesn't like Mozilla code Smiley
    If I'm not mistaken, opacity is an attribute recognized by Mozilla browsers.

    Opacity, and Filter are needed to make the opacity change for both IE and Non-IE browsers.

  • User profile image
    Secret​Software

    because opacity is not a valid css style property, so browsers ignore it,
    and VS gives a warning. the only way to get opacity is to use an image.

  • User profile image
    phreaks

    jsampsonPC wrote:
    Looks like it doesn't like Mozilla code
    If I'm not mistaken, opacity is an attribute recognized by Mozilla browsers.

    Opacity, and Filter are needed to make the opacity change for both IE and Non-IE browsers.


    But why does it fail the build? it isn't even compiled code!

    Now I remember why I stopped working with the web, and am now working against it.


  • User profile image
    phreaks

    SecretSoftware wrote:
     because opacity is not a valid css style property, so browsers ignore it,
    and VS gives a warning. the only way to get opacity is to use an image.


    No Warning. Error.

  • User profile image
    jsampsonPC

    phreaks wrote:
    
    jsampsonPC wrote:Looks like it doesn't like Mozilla code
    If I'm not mistaken, opacity is an attribute recognized by Mozilla browsers.

    Opacity, and Filter are needed to make the opacity change for both IE and Non-IE browsers.


    But why does it fail the build? it isn't even compiled code!

    Now I remember why I stopped working with the web, and am now working against it.




    Shouldn't turn you against the web, should turn you against using VS to write CSS Smiley

  • User profile image
    phreaks

    jsampsonPC wrote:
    
    phreaks wrote: 
    jsampsonPC wrote: Looks like it doesn't like Mozilla code
    If I'm not mistaken, opacity is an attribute recognized by Mozilla browsers.

    Opacity, and Filter are needed to make the opacity change for both IE and Non-IE browsers.


    But why does it fail the build? it isn't even compiled code!

    Now I remember why I stopped working with the web, and am now working against it.




    Shouldn't turn you against the web, should turn you against using VS to write CSS


    What do you use to write CSS? Notepad?

  • User profile image
    jsampsonPC

    I use notepad, or Dreamweaver.
    Primarily Dreamweaver - it has intellisense.

  • User profile image
    phreaks

    jsampsonPC wrote:
    I use notepad, or Dreamweaver.
    Primarily Dreamweaver - it has intellisense.


    The only version of Dreamweaver I own is the one that I bought along with Homesite 3.x about 8 years ago. Sad

  • User profile image
    Sven Groot

    Yes, it will give you an error message for non-standard properties.

    This should not, however, prevent the solution from building. Could you post the complete build output here?

  • User profile image
    Zeus

    phreaks wrote:
    
    jsampsonPC wrote:I use notepad, or Dreamweaver.
    Primarily Dreamweaver - it has intellisense.


    The only version of Dreamweaver I own is the one that I bought along with Homesite 3.x about 8 years ago.

    Ahhhh .... Homesite .... Good times !

  • User profile image
    W3bbo

    jsampsonPC wrote:
    I use notepad, or Dreamweaver.
    Primarily Dreamweaver - it has intellisense.


    Dreamweaver doesn't have IntelliSense.

    It has auto-suggestion, that's not the same thing, even if the user-interface is the same.

    IntelliSense is part of an IDE that actually understands what's been written and can make suggestions based on that, rather than a hardcoded list of possible values (as Dreamweaver does, they're stored in XML/JS files), which is why DW isn't really any good for hardcore web-app development work

  • User profile image
    Harlequin

    If it's Mozilla only, wouldn't moz-opacity be the one to use?

  • User profile image
    irascian

    phreaks wrote:
    

    What do you use to write CSS? Notepad?


    I've yet to find anything that comes close to TopStyle Pro

    And for those who miss HomeSite and prefer writing HTML to letting GUIs generate crap check out CSE HTML Validator

  • User profile image
    jsampsonPC

    W3bbo wrote:
    
    jsampsonPC wrote:I use notepad, or Dreamweaver.
    Primarily Dreamweaver - it has intellisense.


    Dreamweaver doesn't have IntelliSense.

    It has auto-suggestion, that's not the same thing, even if the user-interface is the same.

    IntelliSense is part of an IDE that actually understands what's been written and can make suggestions based on that, rather than a hardcoded list of possible values (as Dreamweaver does, they're stored in XML/JS files), which is why DW isn't really any good for hardcore web-app development work


    Blah! Semantics!
    When I start typing a function name, DreamWeaver tells me all of its parameters, and which are optional. When I start a style-block in CSS, DreamWeaver tells me a list of attributes I can use. When I start...oh well, you don't care Smiley

    Do I think DW compares to VS? Hell no. And the Intellisense (I mean, auto-suggest!) is nowhere near as good as VS's.

  • User profile image
    W3bbo

    jsampsonPC wrote:
    Do I think DW compares to VS? Hell no. And the Intellisense (I mean, auto-suggest!) is nowhere near as good as VS's.


    It just has a huge built-in database of the main PHP functions.

    But should you define a function yourself, it won't appear in the list, neither will any classes you've written.

    So what does Dreamweaver's suggestion list offer that VS doesn't?

    Okay, so DW can suggest possible string values for methods like ASP's Request.ServerVariables("") but again, those are predefined in DW and may not necessarily exist on the server environment.

    VS is intelligent, I like it like that. I can instantiate objects within the IDE (okay, the original credit goes to BlueJ) and get documentation up on methods I've written myself. VS is the one for me.

  • User profile image
    Rowan

    Harlequin wrote:
    If it's Mozilla only, wouldn't moz-opacity be the one to use?


    Yes, but opacity is part of CSS3 and many modern browsers support it correctly now, such as Gecko based browsers and Opera. You would probably have to use -moz-opacity for older Mozilla browsers because I don't think they've supported 'opacity' for very long.

  • User profile image
    jsampsonPC

    W3bbo wrote:
    ...But should you define a function yourself, it won't appear in the list, neither will any classes you've written.


    Exactly. Which is why it's nowhere near as good as VS...
    W3bbo wrote:

    So what does Dreamweaver's suggestion list offer that VS doesn't?


    Nothing....I never claimed that DreamWeaver was in any way superior to VS. The only thing I said was if VS refuses to Build CSS because it has an "opacity" attribute, you should use something else for your CSS-editing.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.