Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS problem about height of a tag

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #285094
    ehsan2003
    Participant

    Hi
    I created a web page, but the main content tag does not get as large as it’s childs
    Therefore, the footer tag falls under the main content tag
    what do i should do for Solve this problem

    #285099
    Paulie_D
    Member

    I would start with reproducing the issue in Codepen.io.

    Just the minimal amount of code to show the problem NOT the entire codebase.

    A vague description of a problem helps no-one.

    #285104
    Beverleyh
    Participant

    Generally speaking, an element’s height should expand to fit the content, unless you have explicit heights defined in the CSS that are restricting expansion, OR child elements are taken out of the document flow (e.g. absolute positioning) so that they are not “seen” by the parent.

    We can’t really offer any specific help without seeing the code upfront though. Please provide a reduced demo in CodePen to show us the undesirable behaviour. Note that we don’t need your whole codebase – just the HTML and CSS relevant to the immediate issue.

    #285106
    ehsan2003
    Participant

    i uploaded my file: https://ufile.io/ozzeq
    please search “this” in style tag for comfort
    Thanks a lot.

    #285112
    Beverleyh
    Participant

    A CodePen is preferred – it’s easier for us to troubleshoot in.

    #285115
    chris_2080
    Participant

    Try add float: right; on #footer
    cheers

    #285126
    ehsan2003
    Participant

    oh. my problem is solved
    Thanks a lot again.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.