CSS & pane trouble

J

Jeff

Hey!

ASP.NET 2.0

I have a webpage which is based on a nested master page. The problem is that
I've applied a theme to the webpage but the CSS settings isn't applied to
the panes.... As you will see in the link, a label market "rightpane" is
placed to the left. It should have been on the right, and have a different
color.

My goal is to create a 3 column layout with panes on the left- and rightside

This works if I use div instead of pane, but from my understanding it's
better to use pane than div because of browser compatibility. I mean the
webserver discover what browser the client is using and then convert to pane
into div which that browser understand.. I other words using panes can avoid
using CSS hacks to make look good.. Do you agree with that? Please if I'm
wrong then tell me it...

Any idea why my CSS isn't applied to the page?

http://home.online.no/~au-holme/pub/66505/column-trouble.PNG

My webpage:
<%@ Page Language="C#" MasterPageFile="~/MasterPages/ContentMaster.master"
AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent"
Runat="Server">
<asp:Label ID="Label1" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label3" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label4" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label5" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label6" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label7" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label8" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label9" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label10" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label11" runat="server" Text="label control in
Default2.aspx"></asp:Label>
<asp:Label ID="Label12" runat="server" Text="label control in
Default2.aspx"></asp:Label>
</asp:Content>

This is the master page the webpage is based on:
<%@ Master Language="C#" MasterPageFile="~/MasterPages/MainMaster.master"
AutoEventWireup="true" CodeFile="ContentMaster.master.cs" Inherits="Content"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="MainPlaceHolder"
Runat="Server">
<asp:panel ID="leftpane" runat="server">
<asp:Label ID="Label1" runat="server" Text="leftpane"></asp:Label>
</asp:panel>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
<asp:panel ID="rightpane" runat="server">
<asp:Label ID="Label3" runat="server" Text="rightpane"></asp:Label>
</asp:panel>
</asp:Content>

The CSS settings I'm trying to apply:
#leftpane
{
width:200px;
left:0;
background-color:Blue;
position:absolute;
top:124px;
}
#rightpane
{
width:200px;
right:0;
background-color:Olive;
position:absolute;
top:124px;
}
#MainContent
{
left:205px;
right:205px;
/*margin-left:205px;*/
/*position:absolute;*/
}
 
S

stacy

Hi Jeff,

Would you mind posting the code solution? I am having a similar
problem in that the .css file seems to be ignored, only the themes
..skin file is applied to my aspx page. I tried the solution you
described, but get errors such as:
Error 1 Validation (ASP.Net): Content is not supported outside 'script'
or 'asp:content' regions.

Regards,
Stacy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top