Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Visual Studio Design View doesn't render internal CSS

$
0
0

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;
            position: absolute;
            border-radius: 5px;
        }

        #box2 {
            background-color: rgba(247, 245, 142, 0.57);
            top: 110px;
            height: 250px;
            width: 20%;
            left: 200px;
            position: absolute;
            border-radius: 5px;
        }

        #box3 {
            background-color: rgba(247, 245, 142, 0.57);
            top: 110px;
            height: 250px;
            left: 480px;
            width: 38%;
            position: absolute;
            border-radius: 5px;
        }



Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>