Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Create your online store today with Shopify

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Disclosure: My content contains affiliate links.

43,239 questions

56,142 answers

573 users

How to display float box and content inside parent box as a container with CSS and HTML

1 Answer

0 votes
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="style.css" />
  <title>Browser</title>
</head>
<div class="box">
  <div class="float">float box</div>
  <p>content inside the container</p>
</div>
</body>
</html>
.box {
  background-color: rgb(145, 205, 239);
  border: 2px solid purple;
  display: flow-root;
}

.float {
  float: left;
  width: 200px;
  height: 150px;
  background-color: white;
  border: 1px solid black;
  padding: 10px;
}

 



answered May 17, 2024 by avibootz

Related questions

2 answers 306 views
306 views asked Jun 18, 2023 by avibootz
4 answers 603 views
1 answer 370 views
1 answer 315 views
5 answers 695 views
5 answers 761 views
...