Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parent div wont expand 1

Status
Not open for further replies.

dcookeap

Technical User
Nov 5, 2008
8
US
Hello,

I have a question that I have been told is easy to fix -- however I have not found that solution so easy to execute.


the above page will illustrate what my problem is.

The black background is a 100% height DIV (and I know that takes the property of the body height as 100% has to be in relation to something). But I cannot for the life of me figure out how to have that black expand down to fit all the content.

Then once that is done how do i add a footer that is x amount of spaces below the end of the container div?

I am probably a 4-5 out of 10 when it comes to CSS and I would love this whole site to be tableless?

Also if any of you can check out the stylesheet and critique it or let me know if i am doing anything wrong I will appreciate that as well. But my main question is how do i get that black background to auto fit the height of the content.

thank you,
 
Your excessive and wrongful use of position absolute is overwhelming, and as such will make it impossible to get it to function correctly.

position absolute takes the elements out of the normal flow, of the document. This also has the side effect of not actually contributing to their containers actual content. This in turn makes it impossible to actually have the containers wrap round the content since basically they have no content to wrap around of.


I know this is not what you want to hear, but I think you'd be better of starting again, and using floats instead of position absolute to get your divs where you want them. That would make it easier to get your container div to wrap around them.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
thank you for pointing me in the righ direction -- i will return should i have any future issues
 
Should have any problems please do return.

I'm sorry for the bluntness.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
The first line in your layout.css file is affecting it.
Code:
S@charset "utf-8";

Remove the S and it works.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
oh i am back -- another quick one -- this is working now in IE but not in Firefox?
 
page checks out as xhtml transitional

i cant figure out why the layout isnt working in firefox
 
Some of your issues come from not clearing your floats, some from collapsing margins. Some of these can be a quick fix, other might require you to rework some of the page. I would recommend always designing for FF first, because it behaves like most other browsers and it is less forgiving with incorrect code than IE.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top