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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:10:10+00:00 2026-06-10T05:10:10+00:00

<div style=float:left;width:100px;height:100px;border:1px solid black; onclick=this.innerHTML = ‘TEST’;></div> When I click on this box Firefox

  • 0
<div style="float:left;width:100px;height:100px;border:1px solid black;" onclick="this.innerHTML = 'TEST';"></div>

When I click on this box Firefox selects the text. If the div is not empty the text is not selected. Why is that?

Demo

  • 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-10T05:10:12+00:00Added an answer on June 10, 2026 at 5:10 am

    I don’t know what the reason is, but there’s a simple solution. Put a &nbsp; in the div. Your code would look like this:

    <div style="float:left;width:100px;height:100px;border:1px solid black;" onclick="this.innerHTML = 'TEST';">&nbsp;</div>
    

    Demo

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

Sidebar

Related Questions

<div style=width: 800px;border:1px solid black> <div style=width:100px;height:100px;float:left;border:1px solid black></div> <div style=float:left>ssdfsdfsdfsdgfag25w6a4g8w5614w5sge16dgf45d4sdffffffffffffffffffffffffffffffffffffffffffffffffffffff5s4f64s6f456a46f456a456456456f456we4f54we5gf45456v4sd5646sadf54s56f465as4f564as56f</div> <div style=clear:both></div> </div>
<style> div#float { text-align: center; float: left; width: 150px; height: 150px; border: 1px solid
My navigation panel currently has the following attributes: <div id='navpanel' style='float:left; width:300px; height:100%; overflow:hidden;
It doesn't stay where I want it, look at this: <div style=float: left; width:
<html><head><title>Test</title> <style> .main{width:600px;border:1px solid red; } .main .left{background:lightblue; width:100px;clear:both; float:left;} .main .right{margin-left:100px;background:lightyellow; } </style>
<td id=name_3869-0_0 style=position: relative; colspan=4> <div style=float:left;width:100%> <img src=/img/1.gif align=middle style=margin-right: 10px; class=company_symbol border=0>
<div style=float:left; width:50%;> div 1 <div style=position:absolute; width:105%>nested element</div> </div> <div style=float:left; width:50%;> div
<div style=background-color:black> <div style=float:right> Test message </div> <div> This will show 'Test message' with
this is my code : <style type=text/css> #draggable { width: 100px; height: 100px; padding:
I have this code: http://jsfiddle.net/cmF4S/3/ <div style=float: left; position: relative;> <input type=text placeholder=Search... style=float:

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.