bkelly Posted April 27, 2009 Report Share Posted April 27, 2009 (edited) I created this class (I think its a class) in the css file to define a paragraph with a border. .paragraph_border { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12pt; color: green; border-top: 2px solid blue; border-left: 2px solid blue; border-bottom: 2px solid blue; border-right: 2px solid blue; } This I used it with this paragraph in index.htm: Links to Local Golf Sources "The Golf Doctors" on Merritt Island can repair your clubs and provide the golf accessories you need. Check them out at 2137 N Courtenay Parkway. To check their web site click As shown, it works as expected. However, when I uncomment out any of the formatting code it disrupts the paragraph. The border is not placed correctly. What is going on here? Can this be made to work? Edited April 27, 2009 by bkelly Quote Link to comment Share on other sites More sharing options...
Andrea Posted April 27, 2009 Report Share Posted April 27, 2009 The tag defines a paragraph. - By using you hide what's in between from the browser, so it's like it's not even there. That said - there should not be anything between a set of paragraph tags but maybe inline styling. is a header tag - headers belong above paragraphs, not inside them. is for line breaks - it's not supposed to be uses to create space. the center tag is deprecated and should not be used. So the HTML you have above should really look like this: Links to Local Golf Sources "The Golf Doctors" on Merritt Island can repair your clubs and provide the golf accessories you need. Check them out at 2137 N Courtenay Parkway. To check their web site click Quote Link to comment Share on other sites More sharing options...
Wickham Posted April 27, 2009 Report Share Posted April 27, 2009 .........and this here Quote Link to comment Share on other sites More sharing options...
LSW Posted April 27, 2009 Report Share Posted April 27, 2009 And never use "Click Here" Are you trying to hide something? You don't want the user to know where they are going to go? Blind users should blindly trust you? Click here is unprofessional, user unfriendly and incorrect if you have more than one per page. Just use TheGolfDoctorisin.com so they know where they are going. Quote Link to comment Share on other sites More sharing options...
bkelly Posted April 27, 2009 Author Report Share Posted April 27, 2009 Thelma, I intended to hide those lines in my post because they were not working. Wickham found that I left quote marks off the end of the link and that fixed one problem. Is there a way to center just one line within a paragraph? I wanted that line "Links to Local Golf Sources" to be centered within the borders of the paragraph. Can that be done? Wickham, Thanks for noting the missing quote. LSW, I didn't intend to hide anything as the web site shows when they get there. But I understand your comment and they viewers should should see the address before they go. I'll make my links as you suggest. Quote Link to comment Share on other sites More sharing options...
virtual Posted April 27, 2009 Report Share Posted April 27, 2009 As Thelma explained, it would be better to put your line "Links to Local Golf Sources" within an tag which you could then style and the rest of your paragraph in tags. Quote Link to comment Share on other sites More sharing options...
bkelly Posted April 28, 2009 Author Report Share Posted April 28, 2009 It appears to me that if I define a paragraph style in my CSS, and use that style in a page, then I cannot put a sub paragraph inside the first one. Closing the sub paragraph appears to close out the CSS declaration/definition. Is there a legitimate method of embedding paragraphs within paragraphs in CSS? Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted April 28, 2009 Report Share Posted April 28, 2009 No. A paragraph can not contain another paragraph. The closing tags get confused. And it is poor semantics. A Paragraph can contain a span, though. Quote Link to comment Share on other sites More sharing options...
Wickham Posted April 28, 2009 Report Share Posted April 28, 2009 (edited) Is there a way to center just one line within a paragraph? Various ways. You have to start a new paragraph or heading with text-align: center; either inline Centered text or as a class .centertext { text-align: center; } Centered text or you can use a span tag inside one p tag which needs display: block to start a new line 100% wide. This keeps the same line height and margins between lines (a new p tag will probably create more space between lines):- css:- .centertextspan { display: block; text-align: center; } html markup:- hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello Edited April 28, 2009 by Wickham Quote Link to comment Share on other sites More sharing options...
Andrea Posted April 28, 2009 Report Share Posted April 28, 2009 But for the part we're discussing here (see Post #1), the logical, semantic solution is to put the TITLE (Links to....) inside tags - which one (h1, h2, h3, h4, h5, etc) depends on the remaining content. Quote Link to comment Share on other sites More sharing options...
bkelly Posted April 29, 2009 Author Report Share Posted April 29, 2009 (edited) Thelma, Wickham, jlhaslip, Virtual, and LSW, I think I understand the last three posts. Thanks. You have helped me resolve the initial problem and led me to much new information. I think I'll let this stop here and continue working on improving my site and expanding my knowledge of what you have shown me. Thank you for all the time you spent answering my questions. :) :) Bryan Edited April 29, 2009 by bkelly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.