HTML code needed

by 3 replies
4
Can anyone tell me how to code a aesthetically pleasing box that goes around text. So like, if I want to write a review on a product, but have it highlighted on the site by putting it in a nice box? How would I do that?
#website design #code #html #needed
  • Sure- it can be done easily using CSS.

    <div style="width:300px;height:120px;border:2px solid red;">
    This text will display in a box with a 2px red border.
    </div>
  • [DELETED]
  • The best way would be to define a css class that would apply to the box. This would allow you to change the style at a later date and it would apply to all boxes sharing that "class".

    For example:

    Code:
    <div class="myBox">Your content goes here</div>
    And then the css styling for "myBox" would be something like this (in a separate linked, css file)

    Code:
    .myBox{
    border:1px solid #ccc;
    border-radius:12px;
    background:#eee;
    padding:20px
    {
  • THANKS EVERYONE

Next Topics on Trending Feed

  • 4

    Can anyone tell me how to code a aesthetically pleasing box that goes around text. So like, if I want to write a review on a product, but have it highlighted on the site by putting it in a nice box? How would I do that?