简体   繁体   中英

how to set an HTML border like this without using table?

I want to set an inside border on the "Terms and Conditions" header like shown Here And I don't want to use a table. Is there any way around this? Please help.

Try this. You may modify/amend the styles as per your requirement but I have given you a basic approach.

.header{background:#fff; padding:10px;}
.inner-header{border:1px solid grey;}


<div class="header">
     <div class="inner-header">
         This one will have the border
     </div>
</div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM