Viewing margins displayed differently in Chrome compared to Firefox and making corrections accordingly

Why is the margin not displaying correctly? I noticed a 4px difference in Chrome in the box_news element. I read something about rest.css but I'm not sure if it will be helpful in my situation.

This is the code on the right side:

<div class="rightside">


  <div class="box_news">
                            <h1>الاخبار</h1>

                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <div class="centerIt">
            <div class="readmore"><a href="#">مزيد من الاخبار</a></div>
            </div>
               <br><br>
    </div>





<div class="box1">
<h1>آخر معارض الصور</h1>


    <table align="center">
<tbody><tr>
    <td align="center"><img width="140" height="110" src="./Chrome_files/illaf693012853.jpg" alt="alt">
    </td>
</tr>
<tr>
    <td align="center">
    <a class="gallery" href="http://domain.com/ictproject/site/gallery?gal_id=13">اللاذقية 2013: مساعد ممارس في البرمجة اللغوية العصبية</a><br>2013-03-03</td>
</tr>
</tbody></table>
    <table align="center">
<tbody><tr>
    <td align="center"><img width="140" height="110" src="./Chrome_files/illaf654896994.jpg" alt="alt">
    </td>
</tr>
<tr>
    <td align="center">
    <a class="gallery" href="http://domain.com/ictproject/site/gallery?gal_id=5">دورة المغرب الصور الكاملة </a><br>0000-00-00</td>
</tr>
</tbody></table>
    <table align="center">
<tbody><tr>
    <td align="center"><img width="140" height="110" src="./Chrome_files/illaf906907216.jpg" alt="alt">
    </td>
</tr>
<tr>
    <td align="center">
    <a class="gallery" href="http://domain.com/ictproject/site/gallery?gal_id=12">اللاذقية 2012: دبلوم البرمجة اللغوية العصبية (2)</a><br>0000-00-00</td>
</tr>
</tbody></table>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <div class="centerIt">
         <div class="readmore"><a href="http://domain.com/ictproject/site/Galleries">مزيد من المعارض</a></div>
         </div>
</div>



        </div>       

CSS :

.rightside {
    display: block;
    padding-top: 0;
    position: relative;
    width: 215px;
}

.box1{
display: block;
position: relative;
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 0 2px #cccccc;
color:#666666;
font-family: DroidKufi-Regular;
font-size:12px;

width: 98%;
margin-top: -27px;


}

.box1 p {font-size:12px; text-align: right; color:#666666;}
.box1 a { text-shadow: 1px 1px 1px gray; color:#1570a6; }
.box1 a:hover { color:#49a4da; }
.box1 H1{
color:#1570a6;
font-family: DroidKufi-Regular;
font-size:14px;
border-bottom:thin #eee solid;
text-shadow: 0px 0px 0px gray;
padding:5px;
}
.box_news{
 margin-top: -27px;
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 0 2px #cccccc;
color:#666666;
font-family: DroidKufi-Regular;
font-size:12px;

width: 98%;
margin-bottom: 10px;
height: 100%;

}
.box_news H1{

color:#8b9801;
font-family: DroidKufi-Regular;
font-size:14px;
border-bottom:thin #eee solid;
text-shadow: 0px 0px 0px gray;
padding:5px;

}
.news_title{
color:#8b9801;
font-family: DroidKufi-Regular;
font-size:11px;
text-shadow: 0px 0px 0px gray;
padding:0px;    
}
.news_title a{
color:#8b9801;
}
.news_title a:hover{
color:#;
text-shadow: 1px 1px 1px #EEE;
}
.news_time{
color:#cccccc;
font-family: DroidKufi-Regular;
font-size:10px;
border-bottom:thin #eee solid;
text-shadow: 0px 0px 0px gray;
padding:0 10 0 0px; 
}
.readmore{
    display:block;
    width:110px;
    height:24px;
    font-size:12px;
    background:url(../images/readmore.png) no-repeat center;
    font-family:DroidKufi-Regular;
    text-align:center;
    color:#FFF;
    padding:4 0 0 5px;
    margin:4px;
}
.readmore a{color:#FFF;}
.readmore a:hover{text-shadow: 2px 2px 2px #0a4e76;}

Firefox

Chrome

I would greatly appreciate any assistance. Thank you in advance.

Answer №1

Take out the padding:5px; styling from .box_news H1 and it should function properly

Answer №2

Start by setting overflow:hidden on the .news_container

just like so

.news_container{
overflow:hidden;
}

Answer №3

There appears to be a difference in the font display between browsers. The text seems larger and more stretched out in Chrome compared to the other browser.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Click on the canvas to fill a specific area with JavaScript

My goal is to implement a JavaScript function that will shade specific areas of canvas drawings when clicked. Below is the code I have that draws a square inside a circle. <!DOCTYPE HTML> <html> <head> </head> <body&g ...

Choose everything except for the list and its heading

I have a portion of HTML code on my hands. <div class="ProductDescriptionContainer"> <p>This handsome Clergy Shirt has a trim low neckband with two reinforced buttonholes, one at the front, one at the back, to align with Ziegler's Collare ...

Vue.js implementation of FontAwesome eye icon for toggling password visibility

I am utilizing the font awesome eye icon to toggle the visibility of a password field for user login. Although the icon displays correctly, I am encountering an issue where the entered characters are not being shown. Can anyone provide assistance with this ...

Get a Blob as a PNG File

Hope you had a wonderful Christmas holiday! Just to clarify, I am new to JS and may make some unconventional attempts in trying to download my Blob in PNG format. I am facing an issue with exporting all the visual content of a DIV in either PDF or image ...

How can I determine the remaining amount of scroll left in my HTML document?

Is there a method to determine how many pixels of scroll remain on the page when the scrollbar is set at a specific position? I am currently utilizing jQuery's scrollLeft feature, which can be found here: http://api.jquery.com/scrollLeft/. I want to ...

Steps to center the background color and text on screen:1. Determine the dimensions of

I've tried many different approaches, but I'm struggling to figure it out. In my code below, the h1 and h2 elements have a gold and black background respectively. Although I've set their width to 500px, they are stuck at the top left corner ...

Using jQuery, we can replace all `<span>` elements with `<img>` elements and then verify if the images have been successfully loaded

Similar Inquiry: jQuery check if image is loaded I find myself in a scenario where the following HTML structure is utilized: <div class="image"> <img class="" src="content-images/1.jpg"> <span class="slide" rel="content-images/ ...

What is the best method for eliminating buttons and text in a row using CSS?

I faced an issue when trying to create a row, so I improvised with the following setup. However, I actually need a proper row layout for both the Google button and telephone number button. Here are my CSS snippets: .google-button { color: white; borde ...

Is it possible to use just one <map> tag for multiple images in jQuery or JavaScript?

I have multiple images on my website <img usemap="#slideMap_branches" src="branches.png" width="890" height="270" alt="Slide 4"> <img usemap="#slideMap_order" src="order.png" width="890" height="270" alt="Slide 2"> <img usemap="#slideMap_c ...

Whenever I attempt to update content in my database using an HTML form, I encounter an issue where if I enter a single quote character in the input field, the SQL update operation fails

Whenever I fill out a basic form and include an apostrophe or single quote, the query breaks and the data is not added to my database. How can I prevent this issue? Form Example <form method="POST" action="#"> <table> < ...

Make the height of the CSS div fill the remaining space and allow scrolling once the maximum height of the screen is reached

I've scoured the internet high and low for a solution to my problem, but I just can't seem to find anything that fits my needs perfectly. The answers I have come across are either outdated or not quite what I'm looking for. I'm really h ...

I tried to upload a unique theme on my WordPress website, but unfortunately, the design is not displaying correctly. I am having

After uploading a custom theme on WordPress as a parent theme, I encountered an issue where only simple text appeared on the screen without any styling, images, or sliders. Being new to PHP, I struggled to understand how to enqueue the styles in the functi ...

Switch back and forth between different information

My Bootstrap version 4.1.1 page needs a tweak. I want to make the background color of the active toggle white. .nav-tabs { margin-top: 3%; border: none; background: #0062cc; border-radius: 1.5rem; width: 28%; float: right; } .nav-tabs .nav- ...

Conditional ngOptions in AngularJS allows you to dynamically update the options

Currently, I am working with a select box that iterates through an array of departments to identify eligible parent departments. <select class="editSelectBox" ng-model="dept.parentDepartment" ng-options="dept as dept.name for dept in depts track by de ...

What is the best way to use jQuery to animate a particular height up to 100%?

To provide a sneak peek of the content in the div, I have minimized it so only the first line is visible. Now, I want to add an animation that will expand the div to 100% height when you click the title. However, using animate(height:"100%") does not res ...

Transforming any Mod RewriteRule or RedirectMatch

Here is the scenario on a website: DOMAIN.com/shop/page/116/?orderby=date DOMAIN.com/shop/page/116/?orderby=menu_order DOMAIN.com/shop/page/116/?orderby=price DOMAIN.com/shop/page/116/?orderby=XXXX The value of XXXX changes, but regardless of what it is ...

Creating side panels on the left and right using CSS and HTML

I am looking to design a website where users can open sidepanes from both the left and right sides. I am not proficient in JavaScript and would prefer a solution using only CSS and HTML. While browsing, I came across a website that achieves what I want thr ...

What is the best method for eliminating the initial character in every line of a textarea?

The desired output should display as LUNG,KIDNEY,SKELETON>J169>U and E, CREATININE:no instead of >LUNG,KIDNEY,SKELETON>J169>U and E, CREATININE:no. Is there a way to achieve this using JavaScript? Specifically, the ">" character at the be ...

send css as a parameter to the component

Could it be possible to develop a component with specific CSS attributes? I am aware that the following approach is not valid. <template> <div id="textContainer"> {{ content }} </div> </template> <script> export defa ...

Replicate the anchor's functionality (opening in a new window when 'ctl' is pressed) when submitting a form

I have a question that may seem unconventional - Is there a graceful method to replicate the functionality of an anchor tag when submitting a form? I want users to be able to hold down the control key while submitting a form and have the result open in a ...