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

  • Home
  • SEARCH
  • 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 7566457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:25:10+00:00 2026-05-30T14:25:10+00:00

I have 3 <p> with set widths, but occassionally i there will be no

  • 0

I have 3 <p> with set widths, but occassionally i there will be no content inside of them, but I need them to keep their widths, even if no content is inside the <p>.

<div class="grid_12 alpha omega directory-phone-table-row">
        <p class="grid_3 phone-name omega"><a href="javascript:;">${firstname}, ${lastname}</a></p>
        <p class="grid_3 alpha omega">${phonework}</p>
        <p class="grid_3 alpha omega">${departmentName}</p>
    </div>

.directory-phone-table .directory-phone-table-data p{
    color: #000;
    font-size: 12px;
    float: left;
    width: 220px;
    overflow: hidden;   
}
  • 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-30T14:25:11+00:00Added an answer on May 30, 2026 at 2:25 pm

    I don’t think it’s possible to define a width of a block element when there is no content inside. At least, from my experience anyway. What I normally do is put spaces where you might expect an empty value (better yet, use the html code for space: &nbsp;). If you have a way to return a space character if data returns nothing — go that route, otherwise you can put a space at the end of your variables like so:

    <p class="grid_3 phone-name omega"><a href="javascript:;">${firstname}, ${lastname}&nbsp;</a></p>
    <p class="grid_3 alpha omega">${phonework}&nbsp;</p>
    <p class="grid_3 alpha omega">${departmentName}&nbsp;</p>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main wrapper div that is set 100% width. Inside that i
I have this container div whose width I would like to set according to
I want to have an inner div that sites inside different sized container divs,
I have a databound list view and can set all the column widths manually
I have DIV with flexible width set e.g. min-width:800px and max-width:1400px. In this DIV,
I need some advice on how to set column widths in a HTML table.
I have a listview of width set to Auto. When I run the windows
How do I find the width of an element? I have maxwidth set to
I have a form that contains dataGridView, whose coloumn are set to dgrv1.Width =dgrv1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)+20;
I have an image with height 173px and width 157px .I want to set

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.