leela52452 Posted December 11, 2019 Share Posted December 11, 2019 (edited) my css contains body { font-family: sans-serif; margin: auto; width: auto; my <pre> pre { font-family: sans-serif; background-color: #ffff00; color: #0a0a0a; line-height: 1.5em; letter-spacing: 0.12em; word-spacing: 0.16em; margin-bottom: 2em; font-size: 1.5em; } with and without pre code, it is not responding Edited December 11, 2019 by leela52452 it was incorrect title Link to comment Share on other sites More sharing options...
dsonesuk Posted December 11, 2019 Share Posted December 11, 2019 Missing } for body selector or is it typo? Width is auto by default for body also. Link to comment Share on other sites More sharing options...
leela52452 Posted December 11, 2019 Author Share Posted December 11, 2019 52 minutes ago, dsonesuk said: Missing } for body selector or is it typo? i rechecked again, it is partly cooy and paste. i am unable to post URL here, hence attaching screenshots. correct : portuges (in image) incorrect : who am i (in image) Link to comment Share on other sites More sharing options...
leela52452 Posted December 11, 2019 Author Share Posted December 11, 2019 i am attaching both css and index.html filez style.css index.html Link to comment Share on other sites More sharing options...
Ingolme Posted December 11, 2019 Share Posted December 11, 2019 The <pre> element by default allows text to overflow. You should use an element other than <pre>. If you still want a <pre> element there, you can override its behavior with CSS using "white-space: normal;" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now