#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    31
    Rep Power
    6

    Missing second line of text


    Hi guys,

    I'm currently writing a quiz app where the three potential answers are styled with the following css:
    Code:
    		.answer {
    				color				: Black;
    				background-color	: Aqua;
    				border-radius		: 5px;
    				height				: 38px;
    				width				: 320px;
    				padding				: 5px;
    				line-height			: 38px;
    				text-align			: center;
    		}
    When the text for the potential answer is longer than 320px, the rest of the text doesn't display.
    How could I change this css so that the width remains 320px, but the text wraps so that wide lines
    are displayed on multiple lines below one another?

    Thanks!

    Miktor
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2017
    Location
    Ahmedabad
    Posts
    17
    Rep Power
    0
    Hi,

    you are using below code, only use overflow property

    Code:
    .answer {
    				color				: Black;
    				background-color	: Aqua;
    				border-radius		: 5px;
    				height				: 38px;
    				width				: 320px;
    				padding				: 5px;
                                    overflow                           :auto ;
    				line-height			: 38px;
    				text-align			: center;
    		}

IMN logo majestic logo threadwatch logo seochat tools logo