Adding Boxes on Pages

by 3 replies
4
Hello Everyone,

I would like to know how to put the text on a page in to a large box for lack of better words. I want to put the first few sentences of my post in an area that is enclosed with a read more button in the rectangle also. Is that something that is possible? Thanks
#website design #adding #boxes #pages
  • what do you use?

    wordpress? html?
    • [1] reply
    • There are other attributes you can apply to the div tag. I just picked a few to demonstrate how to do it.
      If you are doing this in a Wordpress site applying the "Style" at the tag level should over ride any styling defined elsewhere in the site.

      Code:
       
      <div style="width:500px; margin-left:auto; margin-right:auto;border:solid 1px Black;">
       
      
      <p> Your text would go here</p>
       
      <a href="http://www.someURLgoesHere.com" >Your "learn more" text would go here</a>
       
      </div>
  • If you're using WordPress and want to have a magazine style blog with a read more link for each post you can change some code in the index.php to display the first 50 or so words "the excerpt" of the post and not the whole post.

    go to your index.php file of your WordPress theme and search for the following code and change

    Code:
    the_content
    with

    Code:
    the_excerpt
    If you would like more information you can take a look at the following page

    Function Reference/the excerpt « WordPress Codex

Next Topics on Trending Feed

  • 4

    Hello Everyone, I would like to know how to put the text on a page in to a large box for lack of better words. I want to put the first few sentences of my post in an area that is enclosed with a read more button in the rectangle also. Is that something that is possible? Thanks