Results 1 to 5 of 5

Thread: [resolved] CSS and MasterPage-style not showing in pages

  1. #1

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved [resolved] CSS and MasterPage-style not showing in pages

    I have a box template css file that i have a <link href..> in the <head> of the Master Page:
    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>
    The div uses centercontent from the css file that basically creates a box centered for content.

    Code:
    	
    #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;
    }
    default page codebehind
    Code:
    <%@ 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>
    on a default.aspx page i've just scribbled some text to check the layout
    but it bleeds right out of the center and into the right margin.

    see attached image of how it displays.
    Attached Images Attached Images  
    Last edited by ZeBula8; Nov 29th, 2007 at 08:54 PM. Reason: resolved

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: CSS and MasterPage-style not showing in pages

    Try adding a / to the front of the path to the css file

    <link href="/App_Themes........

    master pages don't exist on the client, it's the path to the page thats the url

  3. #3

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Re: CSS and MasterPage-style not showing in pages

    I did that but the page still isn't behaving properly.

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: CSS and MasterPage-style not showing in pages

    You have long lines of text which contain no breaks, so basically it is one long word. If the width of a "word" is greater than the width of its container it overflows the container boundaries. Wrapping does not happen in the "middle" of a word.

  5. #5

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved Re: CSS and MasterPage-style not showing in pages

    i also tried using sentences consisting of five words each, and the same thing happens.
    i have figured out what was happening.. the image width was causing this problem. as soon as i adjusted the content to match the image width, the wrapping was correctly being rendered in the contentplaceholder... even with the long text with no breaks.
    thanks everyone for your help.
    Last edited by ZeBula8; Nov 29th, 2007 at 08:53 PM. Reason: [resolved]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width