Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8508789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:15:29+00:00 2026-06-11T03:15:29+00:00

My html code is <div style=border:1px solid red; height:140px;> <div style=width:100px; float:left; border:1px solid

  • 0

My html code is

<div style="border:1px solid red; height:140px;">
    <div style="width:100px; float:left; border:1px solid blue;">
        left
    </div>
    <div style="width:100px;  float:right; border:1px solid blue; ">
        right
    </div>
    <div style="border:5px solid green;">
        middle
    </div>
</div>

Why does the green border spreads to the 100% of width and covers left and right divs? How to fix it so it covers the only block that starts with the word “middle” and ends right before the word “right”?
Just tried position:relative; but it didn’t help.

The example of the code is here:
jsFiddle

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:15:30+00:00Added an answer on June 11, 2026 at 3:15 am

    Write overflow:hidden to it.

    <div style="border:5px solid green;overflow: hidden;">
                middle
    </div>
    

    Check this http://jsfiddle.net/A6qWE/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following html codes <div align=center style=width:1000px;border:1px solid green;> <div style=border:1px solid red;float:left;
The following code: <!DOCTYPE html> <html> <head> <title>Test.</title> </head> <body> <div style=border: solid 1px
So i have this code <html> <head> <style type=text/css> div.one { border:1px solid black;
I have this code <html> <head> <style type=text/css> .frame {width: 50em; border: 1px solid
Let's say I have to following code - <body> <div id=outerdiv style=border: 1px solid
Check this code : HTML : <div style="position: absolute; visibility: visible; width: 172px;"> <img
I have the following html code with Jquery Sorting <div class=sortable style='width:700px; margin: 0
my html code <div id=content_main></div> css #content_main { width:1024px; height:150px; background:url('../images/Orange.jpg'); background-repeat:no-repeat; background-size:1024px 150px;
HTML code: <div class=clearfix style=color: #555 style=display:block; > <input type=text id=id_site placeholder=nom-du-site style=width: 245px;
HTML code: <div class=goleft> AD 300x250 size </div> <div class=itemImageBlock goleft> <span class=itemImage> <img

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.