This is a discussion on "Divs within another div go to the bottom of page..." within the Web Page Design section. This forum, and the thread "Divs within another div go to the bottom of page... are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Divs within another div go to the bottom of page...
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Divs within another div go to the bottom of page...
I hope this makes sense!
I have a 3 column layout. When i put divs inside my center div they start below anything thats in the left div. Heres a screenshot of it... ![]() As you can see the div with the text 'heading' inside it starts way down the bottom of the page. I would like it to start in line with the browse by artist and shopping cart divs in this screenshot ![]() Any idea why the content is starting down at the bottom? Is it to do with 'clear' in the css? Any help appreciated. Nitesh Edit Heres the code... (one of them days!!) CSS
Last edited by Nitesh9999; Feb 23rd, 2006 at 13:17. |
|
|
|
|||
|
Re: Divs within another div go to the bottom of page...
You need to add float:left; to #leftnav and #content.
#leftnav { float: left; width: 160px; padding: 1em; border-right: 1px solid gray; } #content { margin-left: 200px; border-left: 1px solid gray; margin-right: 200px; border-right: 1px solid gray; padding: 1em; max-width: 36em; float: left; } But you do have a lot of unclosed tags!!!! It's messy... |
|
|||
|
Re: Divs within another div go to the bottom of page...
Hi, I fixed it,
I removed the "clear both" from the content div. Here is the latest code (which I tried cleaning using w3 validator, got 8 errors now, but they don't seem to make sense at all)... CSS
|
|
||||
|
Re: Divs within another div go to the bottom of page...
Can you post the list of errors? I'd do it, but it's 8am and I'm still sleeping.
|
|
|||
|
Re: Divs within another div go to the bottom of page...
Hi, the HTML errors (8 now) from the code below
1 Error Line 54, column 56: there is no attribute "name" . <form action="songresults.asp" method="get" name="frmsongsearch"> 2 Error Line 57, column 67: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag . ..." name="searchboxinput" size="25" maxlength="25" /> 3 Error Line 60, column 37: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag . <input type="submit" value="Search" /> 4 Error Line 280, column 29: document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag . <select name="formatnames"> 5 Error Line 284, column 23: an attribute specification must start with a name or name token . <option value="12"">12"</option> 6 Error Line 288, column 22: an attribute specification must start with a name or name token . <option value="7"">7"</option> 7 Error Line 309, column 40: document type does not allow element "input" here . <input type="submit" value="Search" /> 8 Error Line 311, column 9: end tag for "select" omitted, but OMITTAG NO was specified . </form> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". |
|
|||
|
Re: Divs within another div go to the bottom of page...
This is the HTML that gives the errors
I have no idea why there is a error for 2, 3 and 4 Error number 5 and 6 are because of the quotation marks (") used to note the inch unit. Dont know if i can do much to fix that? Not sure about 7 and 8 either? 7 is the submit button for the form. Last edited by Nitesh9999; Feb 27th, 2006 at 13:52. |
|
|||
|
Re: Divs within another div go to the bottom of page...
you need to use " for quote marks in the xhtml which arent part of the tag - see the entities list for other characters: http://www.w3schools.com/tags/ref_entities.asp
|
|
|||
|
Re: Divs within another div go to the bottom of page...
Quote:
|
|
|||
|
Re: Divs within another div go to the bottom of page...
Quote:
|
![]() |
| Tags |
| divs, within, div, bottom, page |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Divs "lagging" as page scrolls | r0ck80y | Web Page Design | 3 | Apr 29th, 2008 14:59 |
| Green bar of colour at bottom of page gets bigger the more page is extended | pixelgirl | Web Page Design | 1 | Apr 1st, 2008 01:27 |
| Repeating an image along the bottom of the page without setting it as background. | imagius | Web Page Design | 9 | Apr 27th, 2007 08:35 |
| Top and bottom margin for container/wrapper divs | jimz | Web Page Design | 1 | Feb 27th, 2006 12:40 |
| place following divs in one page centred div | antonyx | Web Page Design | 12 | Dec 30th, 2005 21:00 |