Side bar acquiring whole body width, cannot insert any other contents on the same line

StackOverflow https://stackoverflow.com/questions/21799676

  •  12-10-2022
  •  | 
  •  

I have created a sidebar in a php file, and included it in another webpage using 'include' syntax. The sidebar acquires only 20% of the body width, but I cannot put anything on the remaining 80%... Whatever I try to enter in those space, it comes in ONE LINE BELOW the sidebar. How do I correct it?

有帮助吗?

解决方案

Use float: left; on both elements to stick them next to each other.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top