Solved

Floating panels (divs) appearing stacked  I want them side by side

Posted on 2006-11-22
11
254 Views
Last Modified: 2008-02-01
Can someone tell me why these would appear stacked at run-time as opposed to side by side?


<asp:Panel id="pnSubContainer" style="width:750px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BORDER-BOTTOM-STYLE: solid" Runat="server">
      <asp:Panel id="pnHomeModifications" style="FLOAT: left; Width=100px" Runat="server"></asp:Panel>
      <asp:Panel id="pnDurableMedical" style="FLOAT: left; Width=100px" Runat="server"></asp:Panel>
      <asp:Panel id="pnTransportation" style="FLOAT: left; Width=100px" Runat="server"></asp:Panel>
</asp:Panel>

in designmode they appear side by side.... and they definitly fit???   so what gives?
0
Comment
Question by:dbedoo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
11 Comments
 
LVL 1

Author Comment

by:dbedoo
ID: 17996130
is height a factor?   my middle panel will be 1 row of text taller than the others but I didn't think that mattered
0
 
LVL 11

Expert Comment

by:ethoths
ID: 17996267
The problem is with the outer div (id="pnSubContainer).

0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17996281
I would try style="position:  absolute", and not FLOAT, if you just want to have 2 panels side-by-side.

Bob
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Accepted Solution

by:
ethoths earned 250 total points
ID: 17996356
This appears stacked at design time and side by side at runtime for me.
            <asp:Panel id="pnSubContainer" style="width:750px; BORDER-TOP-STYLE: solid; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; BORDER-BOTTOM-STYLE: solid" Runat="server">
                <asp:Panel id="pnHomeModifications" style="FLOAT: left; Width=100px" Runat="server">A</asp:Panel>
                <asp:Panel id="pnDurableMedical" style="FLOAT: left; Width=100px" Runat="server">B</asp:Panel>
                <asp:Panel id="pnTransportation" style="FLOAT: left; Width=100px" Runat="server">C</asp:Panel>
        </asp:Panel>

Replacing the outer panel with a div give me side by side in both design and run.

To be honest this is what I would expect since it is a known issue that VS does not display divs correctly at design time.



0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996362
What is the problem with the outer div ethoths?   specifics?  I did this same exact thing with divs in html and it works fine ...
0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996367
sorry I spoke too soon
0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996393
Yeah I dont care about design time ... if it would appear correctly during run time is all that matters.  But you say that its runs side by side for you?    weird ... it doesn't for me ...  stacked every time?
0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996438
I fill the content of the panels in server side codebehind... would that effect the order of rendering these panels?
0
 
LVL 11

Expert Comment

by:ethoths
ID: 17996472
Not sure about the outer div - Probably a VS bug.

My advice is to look at the source code. What gets rendered in the browser is the important thing. panels should be rendered as simple divs and the positioning and layout depends on the css settings. Do you have other divs on the page? Do you have style setting in other css files taht might be affecting this?

0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996761
yes there are other divs on the page ... but this one(pnSubContainer) is not nested within them.  The only thing that could be throwing it off are the tables Im rendering inside the divs via server side vb. which do have css stuff.  Ill take it out and see what happens.
0
 
LVL 1

Author Comment

by:dbedoo
ID: 17996902
That was it ....  stupid mistake ...  it was .css thing I was doing inside one of the tables....  thanks for the help :-)
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question