Keep DIV in Place when Browser is Resized

Tags: , ,
Posted in dotnet, vb, vb.net | 7 Comments »

In the markup below, I’ve got two DIV’s side by side, if the browser is resized, the left div drops below the other. How can I set i up so that it maintains its position and forces the browser to present a horizontal scroll bar if needed?

Code:

        <div style="display:table;margin:19px 10px 0px 0px;float:left;font-size:8pt">
            <div style="background-color:white;padding:5px;border:solid #000066;border-width:0px;width:200px">
                <div style="border: solid 0px #000066;background-color:White;padding:5px">
                    <span style="font-weight:bold;color:#000066">About</span>
                    <div style="border:solid #000066; border-width:1px 0px 0px 0px">
                        This page is a demonstration of how information can be virtually organized making it easier to access.                   
                    </div>
                </div>

                <br />
            </div>
        </div>

        <div style="display:table;margin:19px 0px 0px 0px">
            <div style="background-color:white;padding:5px;border:solid #000066;border-width:0px;width:750px">
                <div style="border: solid 0px #000066;background-color:White;padding:5px">
                    <span style="font-weight:bold;color:#000066">Login</span>
                    <div style="border:solid #000066; border-width:1px 0px 0px 0px;height:50px;padding:5px;margin-bottom:5px;">
                                                <a href="images/login.jpg" target="_blank" style="font-size:8pt">Login Example</a>
                    </div>
                    <span style="font-weight:bold;color:#000066">Directory</span>
                </div>
            </div>
        </div>


Similar:

  1. Validation error: please help I can’t figure out why this page will not validate. I am using Javascript to trigger a php include that pulls in the following code...
  2. Achieveing same with’s in td like as in th hey folks, i m working on a table, its scrollabe. but i am having hard time aligning things, it should align coz the td and...
  3. wrapping text around width in li hey folks, i m working on a project and i wanna wrap text around a width given to li in ul. i tired the width...
  4. DIV question. How can I do this? I have a wrapper div and it would contain 2 inner divs. I would like to center the wrapper div without giving it a width....
  5. Input form and cross browser compatibility Hi Guys, i am creating a simple input form and styling it with css, my problem is i cant get it to look the same...

Tags: , ,

7 Responses to “Keep DIV in Place when Browser is Resized”

  1. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

  2. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

  3. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

  4. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

  5. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

  6. [...] Keep DIV in Place when Browser is Resized | The Largest Forum Archive [...]

Leave a Reply