Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<br> tag having no effect on chrome

Tags:

html

css

xhtml

I have used <br> tags to provide vertical space in html form style. This works fine in Firefox but does not change the spcaing in google chrome. Let me know the mistake please.

Head section

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

A part of my form is:

<div id="filter-details"> 
 <form action="" method="post">
 From Date-Time:<br />
 <input type="text" id="startdate" name="startdate" value="">
 <br />
 To Date-Time:<br />
 <input type="text" id="enddate" name="enddate" value="">
 <br />

CSS stylesheet:

br {
    margin-bottom: 5.7px;
}
like image 377
Ayaz Avatar asked Dec 03 '25 17:12

Ayaz


1 Answers

Add the following css code for Google Chrome, set content:" ";

br{
  display: block;
   margin: 5.7px 0;
  content: " ";
}

br{
  display: block;
   margin: 5.7px 0;
  content: " ";
}
<div id="filter-details"> 
 <form action="" method="post">
 From Date-Time:<br />
 <input type="text" id="startdate" name="startdate" value="">
 <br />
 To Date-Time:<br />
 <input type="text" id="enddate" name="enddate" value="">
 <br />
like image 115
Gowtham Avatar answered Dec 06 '25 11:12

Gowtham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!