+ 5

Border to the text

How to add the border to text which is aligned at center?

26th Jun 2020, 11:51 AM
payal Pawale
payal Pawale - avatar
32 Respostas
+ 11
payal Pawale You can't add a dotted or solid Border in text. I already answered the ways you can. But those are not exactly real borders. If you still think a dotted Border around text is possible using css then this video is for you 😂 https://youtu.be/Ja9wUHH3hzw
26th Jun 2020, 2:08 PM
Kashyap Kumar
Kashyap Kumar - avatar
26th Jun 2020, 12:22 PM
Calviղ
Calviղ - avatar
+ 9
Calviղ I think he meant the question he asked (he wanted dotted Border)
26th Jun 2020, 2:44 PM
Kashyap Kumar
Kashyap Kumar - avatar
+ 9
payal Pawale 🤦🏽‍♂️🤦🏽‍♂️🤦🏽‍♂️ <fieldset> <legend>Try this</legend> //Your codes like paragraph etc </fieldset>
26th Jun 2020, 3:59 PM
Kashyap Kumar
Kashyap Kumar - avatar
+ 8
You can use : -webkit-text-stroke: 2px red; OR Multiple text-shadow, e.g., text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff First one is recommended. Hope it helps you.
26th Jun 2020, 12:17 PM
Kashyap Kumar
Kashyap Kumar - avatar
26th Jun 2020, 2:14 PM
Calviղ
Calviղ - avatar
+ 3
payal Pawale here you go, a border with tittle text on border top https://code.sololearn.com/WASM7eQ2eC1Y/?ref=app
26th Jun 2020, 4:26 PM
Calviղ
Calviղ - avatar
+ 3
This answers are all amazing
27th Jun 2020, 8:33 AM
Jimmy Chinyere
Jimmy Chinyere - avatar
+ 3
Ohhh I've learnt new syntax through the codes posted here
27th Jun 2020, 8:33 AM
Jimmy Chinyere
Jimmy Chinyere - avatar
+ 3
You can try this border:5px dashed black
27th Jun 2020, 11:12 AM
Išhwäŕÿā.P 👑
Išhwäŕÿā.P 👑 - avatar
+ 2
payal Pawale now you show it.. 🤧
26th Jun 2020, 3:55 PM
Calviղ
Calviղ - avatar
+ 1
Calviղ Yess Thank you so much
26th Jun 2020, 4:35 PM
payal Pawale
payal Pawale - avatar
+ 1
I'm not one hundred precent sure but you could try this: <font border="3px"> <p align="center"> your text </p> </font> That may don't work, but something that will for sure work is svg, if you know how to use it, it will be like this: <p align="center"> <svg width="200" height ="100"> <rect width="200" height"50" x="0" y="20" fill="none" stroke="black" stroke-width="3" /> <text x="2" y="23" font-size="2m"> your text </text> </svg> </p> I haven't tried out the numbers yet so you may need to fix these in order to put your text at the exact place you need it to be and you also may need to make the border bigger or smaller, you can just change the numbers till its how you want it to be. If you want the border to be dotted you simply put stroke-dasharray ="5 5" in rect shape, the first 5 decides how big the dots are the second 5 how big the spaces will be.
28th Jun 2020, 9:37 AM
Karak10
Karak10 - avatar
+ 1
<style> span{border: 1px solid black; } </style> <body> <p> <span>your text here </span></p> </body>
28th Jun 2020, 11:55 AM
Amilcar Pouagam
Amilcar Pouagam - avatar
0
No it's shadow. I want to add border like dotted, solid etc
26th Jun 2020, 12:22 PM
payal Pawale
payal Pawale - avatar
0
payal Pawale All right, I know what you want now.. Here the text with border outline only. https://code.sololearn.com/W5FYihk9443T/?ref=app
26th Jun 2020, 12:43 PM
Calviղ
Calviղ - avatar
0
Calviղ see my post .i want main- text overlay with some text
26th Jun 2020, 12:56 PM
payal Pawale
payal Pawale - avatar
0
payal Pawale Here you go, a main text overlay with another text. https://code.sololearn.com/WbLnFM05tYNI/?ref=app
26th Jun 2020, 1:41 PM
Calviղ
Calviղ - avatar
0
Calviղ no this is to much....i just want simple one Please See my post once.
26th Jun 2020, 2:00 PM
payal Pawale
payal Pawale - avatar
0
Calviղ Thank you so much calvin for help. But i want the same which one i posted
26th Jun 2020, 2:18 PM
payal Pawale
payal Pawale - avatar