FlowLayout HELP !

Discussion in 'ASP.NET / ASP.NET Core' started by albanello, May 2, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi
    I need help with a FlowLayout problem. I'm trying to have 3 columns on a page that have a fixed width AND will grow/shink in height if the user selects a larger/smaller font in the browser. I am open to better way of accomplishing this. Till a better suggestion comes along I was thinking a TABLE would work Ha Ha Help!

    What is wrong with the code below I have the first column set at 100px BUT it's width grows instead of wrapping. I don't understand why it does not wrap

    .<TABLE id="tblColumnID" runat="server" width="800">
    .<TR>
    .<TD width="100"><DIV style="WIDTH:100px" ms_positioning="FlowLayout">Column 0
    .gggggggggggggggggggggggggggggggggggggggggffffffffffffffffffffffffffffffffffffffffffffffffff</DIV>
    .</TD>
    .<TD width="350">Column 1</TD>
    .<TD width="350">Column 2</TD>
    .</TR>
    .</TABLE>

    NOTE: The '.' infront of all the HTML is so I can display the HTML in this E-Mail otherwise it creates a table in this e-Mail


    Visual Studio
    Window XP
    ASP.Net 1.1

    Thank in advance
    albanello
     
  2. In your example, it doesn't wrap because the 'gggggggggggggggggggggggggggggggggggggggggffffffffffffffffffffffffffffffffffffffffffffffffff' is considered a very long word and will be over 100px. A normal paragraph with spaces would wrap and the height grow/shrink when the font size is changed.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. If you want to use div's, you can play with "float:left;" and "float:right;"


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  4. Aristotle and Joel

    Thanks for your responce

    Aristotle:
    Excellent point I never thought of that.

    Joel
    Ill try your suggestion. I take it that doing it your way would display scroll bars only if required the length of the column would stay the same. If I do it this way would it be better to not use tables and just place DIV tags for the three columns ?

    Thanks again
    albanello
     
  5. You can do something like this...


    <TABLE id="tblColumnID" runat="server" width="800">
    <TR>
    <TD width="100"><DIV style="WIDTH:100px;overflow:scroll;" ms_positioning="FlowLayout">Column 0
    gggggggggggggggggggggggggggggggggggggggggffffffffffffffffffffffffffffffffffffffffffffffffff</DIV>
    </TD>
    <TD width="350">Column 1</TD>
    <TD width="350">Column 2</TD>
    </TR>
    </TABLE>







    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  6. Ya panels are rendered as div's.


    There's a height property that you can set, but you wont be able to shove text into the panel and try to read what the height of that panel is.









    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  7. Joel


    Thanks for your input. I'm kind of new to ASP.NET, HTML and Visual Studio (WEB Application Development). I'm trying to meet two requirements


    1) If the user selects a different font in the browser the Column (3)need to change ie: the column adjust to the larger/smaller font and everything needs to move down/up right/left.I'd like to kind of magnify/demagnify the page.


    2) It's my understanding that web search engine crawlers may give a better ranking if the most important text is at the top of the HTML source and that they don't like tables. So I would like to avoid them if possible and use div's.


    The use of div's should allow me to satisfy both of these requirements if I canprogrammatically get the height/width of the rendereddiv and programmaticallyplace the footer below the longestdiv column and move the column to the right/left as needed. I'm trying to get the Panel.Height to return it's height. A Panel is just like a div is'nt it ? I don't think there is a height property for a div is there ?


    Thanks again


    albanello
     
  8. The only way you can read the height and width of the container, is if you have already SET the height and width.

    You can't read the height or widthin the example you have provided.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  9. Thanks Joel


    I don't understand the purpose of the height property[​IMG] If I have SET it then I know it's value so I don't need to read it's value. Is a Flowlayout the only way to get the footer to bebelow the columns. I don't know what text size the user is going to select so I can't fix the footer at a fixed value.


    Is there a better way to accomplish the requirements:


    1) If the user selects a different font in the browser the Columnneed to change ie: the column adjust to the larger/smaller font and everything needs to move down/up right/left.I'd like to kind of magnify/demagnify the page.


    2) It's my understanding that web search engine crawlers may give a better ranking if the most important text is at the top of the HTML source and that they don't like tables. So I would like to avoid them if possible and use div's.


    Thanks for your help I'm at a lose for how to deal with this


    albanello
     
  10. Thanks Joel


    What I was hoping to do is to read the height and width divContenton every page_load and then programatically place the footer. The text content will not change, the height and widthwill be a function of the text size selected by the user in the browser. I'm trying to magnify/demagnify the page as a function of the user selected text size.


    .<div ID= divHeader>



    Header</BLOCKQUOTE>


    .</div>
    .<div ID= divContent>



    .<div ID = divColumn0>



    Column0 Design Time Text Content</BLOCKQUOTE>


    .</div>


    .<div ID = divColumn1>



    Column 1 Design Time Text Content</BLOCKQUOTE>


    .</div>


    .<div ID = divColumn2>



    Column2 Design Time Text Content</BLOCKQUOTE>


    .</div></BLOCKQUOTE>


    .</div>


    .<div ID = divFooter>



    Footer</BLOCKQUOTE>


    .</div>


    Thetallest divColumnx will change the height of divContent and the width of divContent will be the sum of divColumn0/1/2


    So if I get the height of divContent then I can place the divFooter at say


    (divContent.height + divHeader.height + 10px)


    Will this work ?


    Thanks


    albanello
     
  11. Correct, you wont be able to use height/width the way you are wanting to use them.

    Why do you need the height and width of these? What are you trying to accomplish?


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  12. Joel

    When I started the site if the user changed theText size in the browser window IE>View>Text Size from theText SizeI developed the site in things would write over other stuff. I used Grid layout with absolute positioning. To correct this I fixed the Font size so the user could not change it. Now that I have the site up I would like to make it more accessible to users that may have to enlarge the text so they can see it, so I was hoping to:



    If the user selects aLARGER/SMALLERText Sizein the browser thediv positionneed to change ie: the column adjust to the larger/smallerText Sizeand everything needs to move down/up right/left. I'd like to kind of magnify/demagnify the page as a function of the Text Size selected by the user. To do this Colunm 1 will enlarge so Column 2 needs to move to the right and column 3 needs to move to the right. In addition the column will get taller so the footer needs to move down other wise the Columns and footer will display over each other if they stay at the absolute position defined at design time.


    I'm sorry if I'm not making my self clear. Thanks for your help.


    Albanello
     
  13. mjp

    mjp



    Search engines gauge "important" text in a few different ways, but tables are not a problem in and of themselves. The spiders look at a page the way a text browser like lynx would look at it, so as long as everything is properly formatted, the search engine will be taking all of the content into account.


    Importance or relevance is determined by complicated (and well-guarded) means, but in general, headings are considered important in the contents, that includes H tags and table headings, and many other tags that emphasize a line of text. Image names and descriptions are also taken into account (always use descriptive but brief alt= tags).


    If your pages are relevant to the subject the search engines will treat them as such. Where people run into problems is trying to put one over on search spiders by using methods that are considered to be manipulation (hidden text, keyword stuffing, etc.). But as long as your content is legit, and your pages are properly formed, you don't have a lot of broken links, etc., you're well on the way.


    Other relevant sites linking to you is also taken into account, but make sure you choose the sites that you approach for links carefully, and avoid link farms and other sites that run afoul of search engine rules.


    Search engine optimization is a tricky and ever-changing subject. To really keep on top of it requires a bit of work, but the results can be worth the effort.

    mjp

    DiscountASP.NET Team
    http://www.DiscountASP.NET
     
  14. It's not even possible to properly read the height/width with javascript. If you set the width at 100, but you have text that pushes the width to 200 and try to read that property, it will still tell you 100.

    you will either have to abandon grid layout or use fixed size fonts, so the client cannot resize your fonts.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  15. Joel


    Sorry it took so long for me to respond, I appreciate your feed back. I was at a meeting/seminar and was unable to get to my E-Mail. I'm using fixed fonts now, thats what I am trying to fix. I found a site which has a great description of how to do what I am trying to do using CSS to float div's http://www.autisticcuckoo.net/archive.php?id=2004/12/10/floating . I am trying what the site suggest.





    mjp


    Thanks for your Seach Engine insite. I don't know enough to try and put something over on theSearch Engine's I'm just trying to be seen by them.


    Thanksagain to both


    albanello
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page