Solved

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

Posted on 2006-11-22
11
251 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
Independent Software Vendors: 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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