Jrod85
12-04-2005, 01:30 AM
.....
|
Click to See Complete Forum and Search --> : The line break that <p> makes... Jrod85 12-04-2005, 01:30 AM ..... Fang 12-04-2005, 01:44 AM Use inline elements if you don't want a line-break, <span> ray326 12-04-2005, 01:52 AM This is probably a dumb question but is there any way to get rid of the automatic line break that the <p> tag makes.You do know what a paragraph is, right? NogDog 12-04-2005, 02:37 AM You can use CSS to set the top and bottom margins for your P elements if you don't like the default value. If you decide to use a first-line indent for paragraphs (such as is done in most print books) you might set the margins to 0. <style type="text/css"> p { margin: 0; padding: 0; text-indent: 2em; } </style> Jrod85 12-04-2005, 07:52 PM Yes, I know what a paragraph is Ray. ray326 12-05-2005, 12:34 AM Yes, I know what a paragraph is Ray.So why do you not expect line breaks between paragraphs? What is the POINT of a paragraph that doesn't separate its content from surrounding paragraphs? Jrod85 12-05-2005, 04:51 PM I don't know Ray, you tell me. Let me re-phrase my question. How do you create a style for text using CSS without using the <header> or <paragraph> tag as they create spaces since that is what a paragraph is and I don't need a paragraph, just a font style but with the use of CSS instead of typing out the code over and over again. Most sites that I've seen use <p> to create styles for text beacuse you have to apply the style to something, u can't just throw it on the page, can you?? cause if you can, then that would be nice. And there's no <f> for font or <t> for text unfortunately. Im new to this CSS and HTML and thought I could find some help here as I do not have much resources. Just needed some clarity, not some critizism from an experienced web-designer. NogDog 12-05-2005, 05:35 PM Start by marking up your page with HTML to describe the structure and meaning of your document. H# tags for headings of different levels, P tags for paragraphs, UL/OL with LI tags for lists, EM and STRONG tags for portions of text within a block element that need to be emphasised or stressed, etc. Then add the less semantically meaningful DIV and SPAN tags where needed to group elements (DIV) or differentiate parts of and element (SPAN). So for example, if you want to apply a different font and color for a section of text within a paragraph to emphasize it, you could do: CSS: .example { font: medium garamond, serif; font-weight: bold; font-variant: normal; color: #990033; } HTML: <p>This is normal paragraph text. <em class="example">This text will have the font style and color specified in the "example" class.</em> Now we are back to normal text.</p> ray326 12-05-2005, 11:45 PM The clarity will come when you start to think of your page as a structured document, encoded with semantically meaningful HTML. There are tags that are "block" like <p> and there are tags that are "inline" like <em> or <strong>. There are two "generic" tags, <div> is block and <span> is inline. In most cases you can avoid using the generics if you use a properly rich mix of standard tags. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |