Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    96
    Thanks
    7
    Thanked 0 Times in 0 Posts

    What am I doing wrong?

    Hello all;
    What am I doing wrong with the test site listed below.
    I have a header that looks fine. Them I have a div called "container".
    Inside that container div, I have another div called "sun" that I floated to the left.
    For whatever reason it gets shoved all the way down to the bottom left. I want it to sit in the upper left had corner of the container div.
    I have been messing with this for hours and can not get it to cooperate.
    I would be very gratefull for some help!

    Thanks
    Shep

    http://wedesignonline.angelfire.com/test/test.htm

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Shep, remember floated elements need to come first in your mark up. Non floated elements next.
    Teed

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    96
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    Shep, remember floated elements need to come first in your mark up. Non floated elements next.
    Hi Teed; Long time no speak. I hope you are well.

    I tried putting the floated element first, but then the div takesup the entire row even though I told it only to have a width of 20 px's.

    Is there a way to make place it inside of the div called container in the upper left hand corner. When I put the floated element 1st as per your instructions, it sees to create an entire new div that is not floated but above the container div?

    Here is the corrected code with the floated element first.

    Thanks Teed!



    <html xmlns="http://www.w3.org/1999/xhtml">

    <style type="text/css">
    body{margin;0px;}
    #header{width:990px;height:280px;border:3px solid yellow;background-color:black;}
    #content{width:990px;height:500px;background-color:blue;border:2px solid yellow;}
    #sun{width:150px;height:20px;background-color:blue;float:left;border:3px solid yellow;}
    h3{text-align:center;color:white;font-size:12px;}
    h1{text-align:center;}
    .indented{padding-left:35pt;padding-right:35pt;font-size:18px;font-family:arial;color:white;}
    .font1{color:white;font-size:14px;font-weight:bold;font-family:georgia;text-align:center;}
    .white{color:white;}

    a:link{color:white;}
    a:visited{color:white;}
    a:hover{color:red;}






    </style>


    <script src="jquery-1.4.2.min.js" type="text/javascript">
    </script>



    <script type="text/javascript" language="javascript">
    function showlist() {if (document.getElementById('addList').style.display == 'none')
    {$('div#addList').toggle('slow');}
    else
    {$('div#addList').toggle('fast');}
    }
    </script>

    <body>

    <div id="header"></div>


    <div id="sun">



    <a name="additionalList"class="white" style="cursorointer;" onClick="showlist()"><p class="font1">Additional Links</a></p>

    <div id="addList" style="display:none">

    <h3><a href="#">CONTESTS<br/>
    <br/>
    <a href="#">MEMBERSHIP<br />
    <br/>
    <a href="#">NEW ARRIVALS<br />
    <br/>
    <a href="#">BLOG<br />
    <br/>
    <a href="#">MEETINGS<br />
    <br/>
    <a href="#">TRIPS</A></h3></DIV>

    </div>



    <div id="content"><br /><h1>EDELSTEIN, SHEPARD</h1>



    <p class="indented">In regards to the sale of the Best Western, I have detailed below some basic items that would need to be

    handled well in advance of the transfer of ownership.
    We operate the hotel with 4 different bank accounts.
    1-Operating account. This is your checking account. All bills are paid out of this account.
    2-Cash account. Each week all of the cash & checks collected from both hotel guests and accounts receivables (Wholesale

    travel agent payments) are deposited into this account.</p>
    <p class="indented">3-Credit card account. Each night during the night audit all credit card transactions are transmitted

    into this account.

    *Note: At the end of each month, the 4 weeks of cash that were deposited into the cash account and all of the credit cards

    that were deposited into the credit card account are transferred into the Operating account.
    4-Payroll account-We pay our staff every two weeks. Each pay period the net amount of the payroll checks is transferred via

    the Internet into the Payroll account.</p>
    <p class="indented">We use “COMPUPAY” to process our bi-weekly payroll. They process all aspects of our payroll including all

    payments of state & federal taxes. The taxes paid and their fees are deducted from the Operating account. You would need to

    open an account with Compupay?
    If you do not already have one, you will need to open an on line account with the STATE OF FLORIDA and the TOWN OF SURFSIDE

    to pay all sales taxes. (7% to the State of Florida and 4% to the Town of Surfside).</p>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •