locked
show different pages on the same RRS feed

  • Question

  • User-1599356091 posted

    i have a website with a master page and when i open a detailsview i want it to show another template inside that masterpage the problem is that because of css it appears strange so is possibçle to show 2 pages on the same page so that part of details view shows different and the rest of the page shows normally page1.

    both are separece css and style

    Thursday, August 22, 2013 6:27 AM

Answers

  • User1186282158 posted

    Hi Troika,

    I would strongly recommend assigning it a custom class and building up the CSS from there. In your DetailsView add:

    CSSClass="MyDetailsView1"

    Call it anything you like! As an example if you give it a class of 'MyDetailsView1' then in your CSS file you can style the elements inside it such as:

    .MyDetailsView1 table
    {
     border: solid 2px red;
     background-color: #EEEEEE;
    }

    I would just do View -> Page Source in your browser once the page renders and see what elements are contained in the DetailsView. In CSS you simply directly reference them - table being referenced in the example. I assume it would have <td> and <tr> and things.

    This method gives you a lot more freedom for styling and it works for pretty much any control!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 22, 2013 7:58 AM
  • User281315223 posted

    You'll need to just ensure that you have two seperate styles being applied to each of the Views seperately. This can be accomplished through targeting your elements by their ID (the ID of your Views) or by using an actual CSS class as Oli recommends : 

    <!-- Example of View B -->
    <div id='ExampleA'>
        <b>Test</b>
        <!-- Example of View B -->
        <div id='ExampleB'>
             <b>Test</b>
        </div>
    </div>

    which could be targeted through the following styles independently : 

    #ExampleA b { color: blue; } /* Sets the contents of your ExampleA area to blue */
    #ExampleB b { color: red; }  /* Sets the contents of your ExampleB area to red */

    CSS uses specificity rules to determine which styles are applied to which elements and the more closely a rule matches a specific element will determine the styles that it uses. So in the example above, #ExampleB b will match <b> elements within your #ExampleB area more closely than in your #ExampleA area, so they will be red : 

    Working Example


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 22, 2013 8:05 AM

All replies

  • User1186282158 posted

    Hi Troika,

    I would strongly recommend assigning it a custom class and building up the CSS from there. In your DetailsView add:

    CSSClass="MyDetailsView1"

    Call it anything you like! As an example if you give it a class of 'MyDetailsView1' then in your CSS file you can style the elements inside it such as:

    .MyDetailsView1 table
    {
     border: solid 2px red;
     background-color: #EEEEEE;
    }

    I would just do View -> Page Source in your browser once the page renders and see what elements are contained in the DetailsView. In CSS you simply directly reference them - table being referenced in the example. I assume it would have <td> and <tr> and things.

    This method gives you a lot more freedom for styling and it works for pretty much any control!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 22, 2013 7:58 AM
  • User281315223 posted

    You'll need to just ensure that you have two seperate styles being applied to each of the Views seperately. This can be accomplished through targeting your elements by their ID (the ID of your Views) or by using an actual CSS class as Oli recommends : 

    <!-- Example of View B -->
    <div id='ExampleA'>
        <b>Test</b>
        <!-- Example of View B -->
        <div id='ExampleB'>
             <b>Test</b>
        </div>
    </div>

    which could be targeted through the following styles independently : 

    #ExampleA b { color: blue; } /* Sets the contents of your ExampleA area to blue */
    #ExampleB b { color: red; }  /* Sets the contents of your ExampleB area to red */

    CSS uses specificity rules to determine which styles are applied to which elements and the more closely a rule matches a specific element will determine the styles that it uses. So in the example above, #ExampleB b will match <b> elements within your #ExampleB area more closely than in your #ExampleA area, so they will be red : 

    Working Example


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 22, 2013 8:05 AM
  • User-1599356091 posted

    could you check here i thin you would understand better http://85.244.14.54:8080/detalhe_atleta.aspx?id=5 so this is 2 pages on the same how to fix all this style errors

    Thursday, August 22, 2013 9:14 AM
  • User-691245060 posted

    possibçle to show 2 pages on the same page

    use iframe...

    thanks,

    Thursday, August 22, 2013 2:50 PM
  • User-1599356091 posted

    could someone check the link above toi check the problem

    Saturday, August 24, 2013 3:35 AM