0

What I thought was simple coding will not work in Chrome. Very basic I'm sure but answers to similar questions in the past seem to deal with much more complex questions in complex ways.

My CSS:

p.m75{font-size:1.15em; margin-left:75px; margin-right:50px;}

My HTML:

<p ><a href="XXX.htm">Thomas</a>, 1694-17??, of Sherston.<br>m.         </p>

<p class="m75"><a href="YYY.htm">Isaac</a>, 1724-17??, 
<br>m Mary COVE 1745 </p>

Microsoft browsers display this as expected - with the second paragraph inset by 75px. Chrome does not. Both paragraphs are in line down the left hand side.

What does Chrome require to achieve the same result?

  • Your code seems to be working fine to me in this fiddle https://jsfiddle.net/wxr01upf/ – AkshAy Agrawal Apr 03 '21 at 08:10
  • Yes it does. But in the real world Chrome does not operate in the same way as fiddle - or microsoft browsers. But thanks for trying it out. – David Brush Apr 03 '21 at 08:53
  • Can you add a screenshot to show the issue and the expected result? – Josh Apr 03 '21 at 16:43
  • For now the problem seems to be solved by taking out the margin-right definition. Too many parameters seems to make Chrome ignore the margin-left definition. – David Brush Apr 04 '21 at 08:23

1 Answers1

0
    <html>
      <head>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial- scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        </head>
      <body>
        <p ><a href="XXX.htm">Thomas</a>, 1694-17??, of Sherston.<br>m.         </p>
        <p class="m75"><a href="YYY.htm">Isaac</a>, 1724-17??, 
       <br>m Mary COVE 1745 </p>
      </body>
    <style>
       p.m75{font-size:1.15em; margin-left:75px; margin-right:50px;}
   </style>
</html>
Adal Khan
  • 19
  • 2
  • Thanks for a quick response. It seems to work but adding code to the end of each page seems to undermine the whole point of CSS. I was really hoping for a way of coding within CSS that enabled the same formatting to apply to the whole of my site. – David Brush Apr 03 '21 at 08:51
  • You can use external css file to apply same formatting to the whole of your website. google search using "How to link external css to my web page" – Adal Khan Apr 03 '21 at 11:27