Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Klaus Bergh 8 posts 76 karma points
    Jul 14, 2015 @ 11:47
    Klaus Bergh
    0

    Color on div with approved color properties

    Hi

    I trying change the background color of a div in one of my templates. it works with the approved color properties, but when i use this the line @inherits Umbraco.Web.Mvc.UmbracoTemplatePage is written on my page, i think it conflicts with my code, or my code conflict with this

    my code is

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>Bootstrap 3, from Visual Composer</title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="description" content="">
      <meta name="author" content="">
    
        <!--link rel="stylesheet/less" href="less/bootstrap.less" type="text/css" /-->
        <!--link rel="stylesheet/less" href="less/responsive.less" type="text/css" /-->
        <!--script src="js/less-1.3.3.min.js"></script-->
        <!--append ‘#!watch’ to the browser URL, then refresh the page. -->
    
        <link href="http://leonora.bergh-abildgaard.dk/css/bootstrap.min.css" rel="stylesheet">
        <link href="http://leonora.bergh-abildgaard.dk/css/bootstrap.css" rel="stylesheet">
    
      <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
      <!--[if lt IE 9]>
        <script src="js/html5shiv.js"></script>
      <![endif]-->
    
      <!-- Fav and touch icons -->
      <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/apple-touch-icon-144-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/apple-touch-icon-72-precomposed.png">
      <link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon-57-precomposed.png">
      <link rel="shortcut icon" href="img/favicon.png">
    
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/bootstrap.min.js"></script>
        <script type="text/javascript" src="js/scripts.js"></script>
    </head>
    
    <body>
    <div class="container">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <nav class="navbar navbar-default" role="navigation">
                    <div class="navbar-header">
                    </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
    
    
    
    
                    </div>
    
                </nav>
                <ul class="breadcrumb">
                    <li>
                        <a href="#">Home</a> <span class="divider">/</span>
                    </li>
                    <li>
                        <a href="#">Library</a> <span class="divider">/</span>
                    </li>
                    <li class="active">
    
                    </li>
                </ul>
                    <div class="jumbotron" style="background-color: <umbraco:Item field="farve" stripParagraph="true" runat="server" />">
    
    
    
                </div>
                <div class="row clearfix">
                    <div class="col-md-12 column">
                    </div>
            </div>
        </div>
    </div>
    </body>
    </html>
    
  • Kasper Dyrvig 246 posts 379 karma points
    Jul 18, 2015 @ 07:01
    Kasper Dyrvig
    0

    What version of Umbraco are you using?

    I think it seems you are tring to combine two types of templates (Master page and MVC).

    If using MVC templates you should be able to do this:

    <div class="jumbotron" style="background-color: @Umbraco.Field("farve", removeParagraphTags: true)">
    <!-- Content here -->
    </div>
    

    Does that work?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies