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 570953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:27:22+00:00 2026-05-13T13:27:22+00:00

I am trying to achieve an effect in HTML + CSS like this _____________________[

  • 0

I am trying to achieve an effect in HTML + CSS like this

_____________________[           Some Div             ]

The ____ is a border-bottom. The Div to the right of it shouldn’t have the border. I want this border to stretch as much as possible, so that together they occupy the width of the parent. I am trying to avoid any fixed spacing layout.

I tried using a table with width:100%:

<table style="width:100%"><tbody><tr>
    <td id="borderDiv"></td>
    <td id="contentDiv">Some Div</td>
</tr><?tbody></table>

The extra space goes to the second td instead of the first one. I also tried floating the content div to the right:

<div>
    <div id="contentDiv" style="float:right">Some Div</div>
    <div id="borderDiv"></div>
</div>

But the div with the border now fills up the entire space of the parent. Couldn’t figure out a way to constraint it to the leftover space.

  • 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-05-13T13:27:22+00:00Added an answer on May 13, 2026 at 1:27 pm

    Maybe I’m misunderstanding your question and I know the HTML + CSS purists are going to hate me for this but can’t you do the following:

    <table style="width: 100%">
      <tr>
        <td style="border-bottom: 1px solid #000; width: 100%">&nbsp;</td>
        <td><nobr>my content</nobr></td>
      </tr>
    </table>
    

    If the second column has a specific width that you want you can specify that and remove the <nobr> tags and end up with something like:

    <table style="width: 100%">
      <tr>
        <td style="border-bottom: 1px solid #000; width: 100%">&nbsp;</td>
        <td style="width: 200px">my content</td>
      </tr>
    </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to achieve this effect with css3: The HTML code is cleanly something
I'm trying to achieve table similar to this using css/html only. Is it possible
I'm trying to emulate this effect: http://meyerweb.com/eric/css/edge/complexspiral/demo.html on my blog: http://segment6.blogspot.com/ It works, but
I've trying to achieve something like this: class Base { public: Base(string S) {
I'm trying to achieve a 50px space at the bottom of my page, below
I'm currently using a combination of CSS and Div tags to achieve rounded corners
Im trying to achieve the following effect in rails: If the text is bigger
I am trying to achieve an effect similar to the globe of the ABC
I am trying to achieve a gradient + text shadow effect in Chrome/Safari using
I am trying to achieve better performance for my Java SWT application, and I

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.