2

So far the only codes that are working are color, padding and font codes. But when i try to add width or align the code to the right it doesent work? html code:

<a href="https://www.football.london/chelsea-fc/transfer-news/juventus-chelsea-vlahovic-transfer-discount-27288176"><b>Juventus offer Chelsea huge Dusan Vlahovic transfer discount if Todd Boehly hands over £97m star.</b></a>

css code:

a{
    font-size: 20pxpx;
    color: hotpink;
    text-align: center;
    width: 100%;
    padding-left: 900px;
    margin-top: 1900px;
    }

I tried changing the width and switching over to max-width and several other things so far nothing has worked



Temani Afif
  • 245,468
  • 26
  • 309
  • 415
hugh bo
  • 21
  • 1

1 Answers1

0

Try adding display: block because a tags are display:inline by default and inline elements don't obey width, height, margin and padding rules. There's also display: inline-block and display: inline-flex depending on what you need.

Jay
  • 42
  • 4