How to align text within a column?

Course Queries Syllabus Queries 3 years ago

3.67K 2 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago


I am trying to create a 3 column webpage. How do I center the header and paragraph on the middle column? How would I align the text to the right when I enter information in the last column? Appreciate the help, thanks.

Also, how do I align the copy right in the middle of the page to the right?

 

*{  
    font-family: Melvetica;
    margin: 0px;
    padding: 0px;
    }

body{
    background-color: #6B6A67;
     }     
#container{
    width: 920px;
    background-color: white;
    padding: 10px;
    margin-left: auto; /*will center your page*/
    margin-right: auto; /*will center your page*/
    }
    
h1, h2{
   text-align: center;
    }



li{
    text-align: center;
    padding: 5px;
    }
h4{
    padding: 5px;
    text-align: center;
    }

/*To style an ID within an ID under it use the parent ID--start with header then call the ID you want to select*/
#container #header{
    height: 80px;
    background-color: #ADA9A0;
    padding-top: 20px;
    padding-left: 10px;
    padding-right: 20px;
    margin-bottom: 5px; /*To add empty space to bottom of the element*/
    }  
#container #navigation{
    margin-top: 5px;
    background-color: #ADA9A0;
    color: white;
    padding-top: 5px;
    padding-bottom: 5px;
    border: 2px solid #ADA9A0;
    }    
    
#container #content{
    background-color: #D9D5CE;
    min-height: 300px; 
    margin-top: 5px;
    margin-bottom: 5px; /*To add empty space to bottom of the element*/
    }  
    
#container #content #sidebar1{
    background-color: #ADA9A0;
    float: left;
    width: 200px;
    min-height: 300px;
    margin-bottom: 3px;
    }     
#container #content #column1{
    background-color: white;
    min-height: 300px;
    margin-bottom: 3px; 
    margin-left: 200px;
    margin-right: 200px;
    margin: 0;
    }         
#
                                                
0 views
0 shares

profilepic.png
manpreet 3 years ago

You need to simply use text-align

Ie: text-align : right , text-align : center

 

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum