I have a box template css file that i have a <link href..> in the <head> of the Master Page:
The div uses centercontent from the css file that basically creates a box centered for content.Code:<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <link href="App_Themes/Theme1/zebula.css" rel="stylesheet" type="text/css" /> <title>Untitled Page</title>> </head> <body> <form id="form1" runat="server"> <div id="centercontent"> <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> </asp:contentplaceholder> </div> </form> </body> </html>
default page codebehindCode:#centercontent { background:#fff; margin-left: 199px; margin-right:199px; border:1px solid #000; voice-family: "\"}\""; voice-family: inherit; margin-left: 201px; margin-right:201px; } html>body #centercontent { margin-left: 201px; margin-right:201px; }
on a default.aspx page i've just scribbled some text to check the layoutCode:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="testOfCSSwithMasterPage.aspx.vb" Inherits="testOfCSSwithMasterPage" title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> jfkdjfkdsfdsfasdfdsfdsfdsfdsfdsfdsafdsfsdfsdjfksdjfkjdslkjfkldjfkldsjflkjds;lkfjdsklfjlkdsjfkjds;klfjs;dkjfjdsfjsdajfsdjfkjsdfjsdkjfdskjf;slkdjf;kdsjf;kldsf dfas;kfdjskl;fjkldsjfk;lsdaf fjkdsafjkadsjfkdsfjksdlfj;lkdsjfkldsjfkl;jdsa;lkfjsda;lkfa </asp:Content>
but it bleeds right out of the center and into the right margin.
see attached image of how it displays.




Reply With Quote