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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:05:53+00:00 2026-05-12T05:05:53+00:00

I seem to be having a strange problem which I can’t fully understand. This

  • 0

I seem to be having a strange problem which I can’t fully understand.

This is my html:

<div class="menu">
Por favor seleccione os conteúdos:
<br/>
<br/>
<br/>
Nome:
<input name="Nome" class="checkbox" type="checkbox" value="Nome" checked />
<br/>
<br/>
Data:
<input name="Data" class="checkbox"  type="checkbox" value="Data" checked />
<br/>
<br/>
Cliente:
<input name="Cliente" class="checkbox" type="checkbox" value="Cliente" checked />
<br/>
<br/> 
Observações:
<input name="Observações" class="checkbox"  type="checkbox" value="Observações" checked />
</div>

Inside an Html page with nothing else except the default stuff from Dreamweaver, placed inside the body.

With this CSS attached:

@charset "UTF-8";
/* CSS Document */

.menu 

{
width:300px;
margin-left: auto;
margin-right: auto;
padding:10px;
border: 1px solid #000;

 }

 .checkbox {

float:right;
}

Now this code renders properly in Safari, text on the left and check boxes aligned on the right inside a div.

In Firefox it does not.

The checkboxes seem like they dropped a line.

It seems to be related to a problem I can’t understand, but If the checkbox comes first like:

<br/>
<input name="Cliente" class="checkbox" type="checkbox" value="Cliente" checked  />Cliente:
<br/>

It renders the intended way in Firefox although as expected its not good on Safari.

I can’t seem to find what’s causing the line drop.

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

    Floats only affect code that follows them in the html. Since you have the input after the label, it will be floated right but on a new line. Different browsers render <br> in different ways.

    A good cross-browser way to do checkboxes is

    .cb-row {margin: 10px;clear:both;overflow:hidden;}
    .cb-row label {float:left;}
    .cb-row input {float:right;}
    
    <div class="menu">
        Por favor seleccione os conteúdos:
        <div class="cb-row">
            <label for="nome">Nome:</label>
            <input id="nome" name="Nome" type="checkbox" value="Nome" checked />
        </div>
        <div class="cb-row">
            <label for="data">Data:</label>
            <input id="data" name="Data" type="checkbox" value="Data" checked />
        </div>
        <div class="cb-row">
            <label for="cliente">Cliente:</label>
            <input id="cliente" name="Cliente" type="checkbox" value="Cliente" checked />
        </div>
        <div class="cb-row">
            <label for="ob">Observações:</label>
            <input id="ob" name="Observações" type="checkbox" value="Observações" checked />
        </div>
    </div>
    

    The label is floated left and the checkbox is floated right. They are contained in a row div that controls the margins between rows. I removed the class= from the input and instead styled the input in .cb-row input

    An advantage of using label with the for= and input with the matching id=, is that when you click on the label, the checkbox will be selected/unselected.

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

Sidebar

Ask A Question

Stats

  • Questions 349k
  • Answers 349k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer $code = Array("test" , "cat" , "test" , "this", "that",… May 14, 2026 at 6:53 am
  • Editorial Team
    Editorial Team added an answer The NetBeans developers do a lot of functional testing and… May 14, 2026 at 6:53 am
  • Editorial Team
    Editorial Team added an answer var images = xml.Descentants("image"); return images.Where(i => i.Descendants("imageType") .All(c =>… May 14, 2026 at 6:53 am

Related Questions

I seem to be having a strange problem which I can't fully understand. This
This is a really strange problem, that appears to be somewhat intermittent (although it
I am trying to currently embed a media player into certain web content and
Your help would be very very much appreciated. I spend 4 hours trying to
So obviously I am doing something wrong, but I just cannot seem to get

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.