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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:12:42+00:00 2026-06-18T04:12:42+00:00

My code is as follows: <div id=latest-text> <p id=text-wrapper> <span style=display: inline-block; id=title>ABFDFDFJEKJRKEREJRKE</span> <span

  • 0

My code is as follows:

<div id="latest-text">
    <p id="text-wrapper">
      <span style="display: inline-block;" id="title">ABFDFDFJEKJRKEREJRKE</span>
      <span style="display: inline-block;" id="subtitle">GJKJGKEJKEJFKAJKEJRE</span>
    </p>
</div>

I want to make the width of the #text-wrapper element the larger width of #title or #subtitle element, but it seems that its width is always the same as the #latest-text element. Is there any way to achieve my goal?

  • 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-18T04:12:43+00:00Added an answer on June 18, 2026 at 4:12 am

    Yes you can do that. Set one of the spans to block, and the parent p tag to inline-block. Let the second span be inline.

    <div id="latest-text">
      <p id="text-wrapper">
        <span id="title">ABFDFDFJEKJRKEREJRKE long, very long, very long</span>
        <span id="subtitle">GJKJGKEJKEJFKAJKEJRE</span>
      </p>
    </div>
    

    css:

    #text-wrapper {
      display: inline-block;
    }
    
    span#title {
      display: block;
    }
    

    See Dabblet: http://dabblet.com/gist/4694336

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

Sidebar

Related Questions

I have menu bar and code is as follows <div style=background:#000; height: 25px;> <div
A minimal code that reproduces the problem is as follows: <div class=cell> <input type=text
I have a code as follows; <div id=scroller style=width: 50%; overflow: auto;> <iframe height=100%
I have a snippet of Javascript code as follows: <div id=TestControl contentEditable=true style=width:200px; position:absolute;
I have the code as follows: <html> <head> <style type=text/css> #container { } #content
Code is as follows: <div id=compare_view align=center> <div id=compv-navbar> <img src=image1.png> | <img src=image2.png>
Code as follows: <div class=mama> <div class=son>Item 1</div> </div> <div class=mama> <div class=son>Item 2</div>
My code is follows: <div class=sidebar id=southsidebar> <!-- archives --> <div class=widget> <h3>Archives</h3> <div
I have a HTML code as follows; <div>Content table with varying height</div> <div id=buttons>
Hey I have my code as follows at the moment <script type=text/javascript> var activeTabId

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.