locked
Visual Studio Design View doesn't render internal CSS RRS feed

  • Question

  • User-508216992 posted

    Hello, 

    I am working with Visual Studio 2015 Community Edition. When I view the page on the browser all the styles are applied correctly, however in the Design View, I am not able to apply the styles, even the positions of the controls. On the beginning I used external CSS files, but since this problem was causing a lot of pain, I decided to put the css styles internal between the <style> tags.

    This made the problem worse because when I keep the styles external some styles like colors and font size have been applied, after the styles were applied internally the page looks in Designer like if I weren't using CSS. Obviously it's making the design very hard. 

    This is a part of the CSS code. Obviosuly I inserted it between the <head> tags. In the aspx markup I have panels which id are box1 box2 and box3. The header color is displayed correctly.

     Is there any option to render the css more accurate? What workaround do you recommend to achieve than the browser displays the same look and feel I see in the Design View?

      header {
                height: 75px;
                background-color: #59d5d8;
            }
    
            #box1 {
                background-color: rgba(247, 245, 142, 0.57);
                top: 20px;
                height: 80px;
                width: 80%;
                left: 200px;
                ;
                border-radius: 5px;
            }
    
            #box2 {
                background-color: rgba(247, 245, 142, 0.57);
                top: 110px;
                height: 250px;
                width: 20%;
                left: 200px;
                ;
                border-radius: 5px;
            }
    
            #box3 {
                background-color: rgba(247, 245, 142, 0.57);
                top: 110px;
                height: 250px;
                left: 480px;
                width: 38%;
                ;
                border-radius: 5px;
            }


    Saturday, November 26, 2016 2:04 PM

All replies

  • User-2057865890 posted

    Hi Faqundo,

    The Web Forms designer is the registered editor for files with an extension that matches that of the file you are working with. If you do not want to use the Web Forms designer to work with a file, change the file's extension. Alternatively, in Solution Explorer you can right-click the file, choose Open With, and select a different editor.

    reference: https://msdn.microsoft.com/en-us/library/aa992034(v=vs.100).aspx 

    Best Regards,

    Chris

    Monday, November 28, 2016 2:48 AM