+ Reply to Thread
Results 1 to 7 of 7

Thread: div element excluding lists?

  1. #1
    vectorx1 is offline x10Hosting Member vectorx1 is an unknown quantity at this point
    Join Date
    Dec 2011
    Posts
    2

    div element excluding lists?

    I'm trying to enclose some <ul> elements in a div and in the preview in my editor it shows it working fine. However, when I open the page in a browser, the div doesn't go all the way down to the <ul> elements. Anyone know why this is happening?

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: div element excluding lists?

    Give us a URL to look at.
    Nothing is always absolutely so.

  3. #3
    vectorx1 is offline x10Hosting Member vectorx1 is an unknown quantity at this point
    Join Date
    Dec 2011
    Posts
    2

    Re: div element excluding lists?


  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: div element excluding lists?

    The reason is because of the "float" on the ul which takes it out of the normal layout.

    Sorry, but don't remember how to fix it, but a Google search might help.
    Nothing is always absolutely so.

  5. #5
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: div element excluding lists?

    The answer is the same as the one in this thread. The problem may be self-correcting once you add more (unfloated) content to the div, or you may need to use a clearfloat element if all of the content is floated.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: div element excluding lists?

    Seems he found the fix.

    Added overflow:auto; to the style of the enclosing div.

    If you view a development page in Firefox with Firebug installed, you can right click on an element and "Inspect element" and see a lot of information and edit/test changes in the browser.
    Nothing is always absolutely so.

  7. #7
    Darkmere's Avatar
    Darkmere is offline x10 Lieutenant Darkmere is an unknown quantity at this point
    Join Date
    Jun 2011
    Location
    Fernley, Nevada
    Posts
    360

    Re: div element excluding lists?

    Quote Originally Posted by descalzo View Post
    Seems he found the fix.

    Added overflow:auto; to the style of the enclosing div.

    If you view a development page in Firefox with Firebug installed, you can right click on an element and "Inspect element" and see a lot of information and edit/test changes in the browser.

    You can do the same thing with Dreamweaver ... just click the inspect code button

    Computer Forensics/Security Student
    Kaplan University
    Site: http://skynet.x10.mx

+ Reply to Thread

Similar Threads

  1. [MySQL] Getting 1st element of list
    By Markstar in forum Programming Help
    Replies: 6
    Last Post: 01-29-2010, 04:37 AM
  2. CSS Lists with images
    By Steeevoe in forum Programming Help
    Replies: 3
    Last Post: 03-29-2009, 09:53 AM
  3. Mailing lists use
    By bloke98 in forum Free Hosting
    Replies: 0
    Last Post: 03-16-2009, 10:28 AM
  4. Mailing lists are gone
    By maclan in forum Free Hosting
    Replies: 0
    Last Post: 11-12-2008, 11:14 AM
  5. New Element In The Periodic Table
    By ironcross77 in forum Off Topic
    Replies: 1
    Last Post: 06-28-2005, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers