+ 2

Problem with border's in CSS!

The first code.. <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <p style="text-align:center;">help!</p> </body> </html> . . . . The second code.. <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <p style="border-style:solid ; border-width:3px; width:100px; text-align:center;">help!</p> </body> </html> . . . In the first code with out border's text will align to the center but in the second code it will not.....i want to now how to align text with border's with CSS.....please help!

22nd Jun 2020, 9:25 PM
Mo7ammed Algaragotti
2 Answers
0
Remove width:100px or replace with width:100%
22nd Jun 2020, 9:32 PM
Ore
Ore - avatar