Forums

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

Home Forums Design nested divs html resposive layout

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #275458
    newcss
    Participant

    hi,

    I have a html and css as shown

    https://codepen.io/aspnetgal/pen/vaoNPz

    I want for desktop the div content which as text (heading and paragraph) and controls to be displayed in single line

    I want for table the div content which as test(heading/paragragh vertically aligned) and controls to be displayed in single line

    I want for a mobile the div content which has test heading,paragraph and controls to be displayed in vertical line.

    #275459
    Beverleyh
    Participant

    Heading, paragraph and div elements are block-level elements by default, so they each take up the whole width of a line themselves. If you want to modify their behaviour so that they sit along one/the same line, look into changing their display property https://www.w3schools.com/cssref/pr_class_display.asp

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