Jump to content

Indent doesn't work


leso9903
 Share

Recommended Posts

Hello! I've tried to use text-indent:2em; and text-indent:100px; to a paragraph and it doesn't work. I've copy-pasted CSS and HTML below. I want to indent paragraph 2 <p2> and it seems to find it because I can change color and so on. Anyone have any idea what's wrong here? CSS:html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline;}/* remember to define focus styles! */:focus { outline: 0;}body { line-height: 1; color: black; background: white;}ol, ul { list-style: none;}/* tables still need 'cellspacing="0"' in the markup */table { border-collapse: separate; border-spacing: 0;}caption, th, td { text-align: left; font-weight: normal;}blockquote:before, blockquote:after,q:before, q:after { content: "";}blockquote, q { quotes: "" "";}/* up to this is css reset*/body { background: #F0F0F0;}a:link {text-decoration:none;}a:hover {color:green;}a:active {}a {color:black; font-size:20px;} .home {color:blue;}.documents {color:blue;}.about {color:blue;}.resources {color:blue;}table, tr, th, td { border: 1px solid black; padding: 4px;}.headresources {font-size:40px;}p2.paragraf { text-indent:2em;}HTML<!DOCTYPE html><html><title>Home</title><head><link rel="stylesheet" href="CSS.css" type="text/css"></head><body><ul><li><a class="home" href="Home.html">Home</a></li><li><a href="Documents.html">Documents</a></li><li><a href="Resources.html">Resources</a></li><li><a href="Four/About.html">About</a></li></ul><br><h1><b>My First Heading</b></h1><p> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis <b>egestas. Vestibulum</b> tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, </p><br><p2 class="paragraf">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, </p2></body></html>

Link to comment
Share on other sites

Try not to invent your own html elements, please, as they won't be recognised, change it BACK to <p class="paragraf"> and use
p.paragraf {text-indent:2em;}

The class name will identify it as being styled differently from rest, thats all you need.

Oh! haha thanks alot /Len
Link to comment
Share on other sites

While I'm at it, and I hope this doesn't bother anyone. a major change of topic. Namely, how do I make my background image cover everything and gets cut below let's say 100px below my content. I got to this http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-clip&preval=content-box but I'm not sure what it tells me. I suspect something with background-clip: 50px; or something, but that doesn't work. /Len

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...