mardi 28 juillet 2015

CSS: h2::first-letter with a border needs a margin for the rest of the h2

I hope this could be answered. More details: I want to create extra spacing after the ::first-letter but when I add margin to it expands the border. I tried to find a solution and found ::after but that didn't work for me..

CSS used:

h2::first-letter {
font-size: 200%;
font-family: Times;
padding-left: 5px;
padding-right: 3px;
border:2px solid black;                                                 
}

h2{
    font-family:"Helvetica Neue",HelveticaNeue,Arial,sans-serif;
    font-weight:normal;
}

Any tips or improvements would be really great! I'm pretty new to it, but I learning it at a decent speed.




Aucun commentaire:

Enregistrer un commentaire