CSS - Text-indentation & First-line Psuedo Element
I want display a paragraph of which all the lines are indented except for the first line.
I tried the following CSS: Code: .myclass:first-line { text-indent: 0; } .myclass { text-indent: 6em; } This achieves the reverse, only the first-line is indented. Can someone help? Similar Tutorialstry to make a UL into a horizontal nav. i want the a's inside the li's to be display:block, so i need a block element around the outside, but that means they wrap to new lines. What is block without new lines? thanks. I'm creating a website in html/css, and I hope this is the correct forum for this issue. I'm not expecting anyone to explain exactly how to do this, but maybe just a point in the right direction as I haven't been able to search for this correctly. Essentially I currently have a list of news items on the front page of my site. I want there to be a small indicator beneath each of these news items that says "comments (#)" where # is number of user comments about that news item. If this is clicked it would take the reader to a different page with the full news article and below it a list of the comments. It seems like some kind of wordpress implementation might work here but I have no idea where to look for something like this. Sorry if that was a little hard to understand, but I can't post urls yet to help explain. Thanks in advance! Trying to create a table psuedo class so that the specific attributes apply to the target table. Not sure if my syntax is correct. What I would like is to call the ID DataTable and have it cascade thru the tr, td...... Here are my tags: #DataTable { width:auto; border-collapse: collapse; border:1px solid #cccccc; border-spacing :20px;} #DataTable tr { border-spacing:20px;} #DataTable td.headerDescription{ width: 240px;} #DataTable td.fundCell { width: 240px; text-indent:40px;} #DataTable td.percentageCell { width: 60px; vertical-align:middle; text-align:center; border-right:1px solid #cccccc;} #DataTable td.seperator { border-top:1px solid #cccccc;} #DataTable td.assetCategory { width: 240px; text-indent:20px; vertical-align:middle;} #DataTable td.headerColumn { font-weight:bold ; width:40px; background-color:#F0F0F0 ; text-align :center;} #DataTable td.leftHeaderColumn { font-weight :bold ; width:40px; background-color:#E0E0E0 ; text-align :center ; border-left:1px solid #cccccc;} #DataTable td.assetClass { width: 240px; vertical-align:middle; font-weight :bold;} #DataTable td.performanceCell { width:60px; background-color:#E0E0E0 ; text-align :center ; vertical-align :middle;} It is a XML/CSS issue. So, I want both the XML and the CSS guys to have a look at it. I already posted the thread in XML forum. I dont want to be double posting. So I am just giving the link he Indentation Problem Any help would be most appreciated. Edit: Link removed... All the pages are the same... Whenever the column on the left ends, the text moves left a few pixels. Anyone know how to prevent this from happening? Thanks in advance! Hi guys, I just wanted to say that I think devshed is a kick butt place for getting help with all sorts of CSS problems... always seems whenever I post that someone really helpful ends up helping me solve the problem in a way I hadn't thought of... So here's the issue: I need to put two elements into a div, one aligned on the left side and one aligned on the right Now what I'm looking at is the section where I have the Home text and the Quick News. So I've put the design into XHTML and CSS he But I can't seem to get the news line to move over properly. Any suggestions? I have used float:right but it just doesn't seem to work. I tried putting a div in and align=right but that pushes the element onto the next line which I don't want. Any ideas guys? There simply has got to be an easy way to align text within a div that I'm missing somehow. Thanks! okay I don't know why my text will not wrap in any of my "float:rights" My quicklink section I don't care about as much as the feature student section I'm building. The text spills out of the paragrah block and keeps running. http://www.mgan.net/form-honors/main(2).htm Any thoughts on how to fix it or a link to a site that would explain it's just as good I have a <ul> list in which I set the opacity for the <li> elements. Inside the <li> elements I have <a> elements. The issue is that the <a> element text is inheriting the opacity for the <li>??? Here is a link http://casadelmar.tmhdesign.com Thanks. i am trying to do something like: <h6>blah</h6><span class="note">*blah</span> but *blah is appearing underneath the h6 which is fair enough but how do i make it appear on the same line? i cant for the life of me think of a css property that lets me do that? I'm having problems getting my text to show up on the same line. I'm not sure what I'm doing wrong. Here is my code: Code: <div id="subtitle"><b>What Personal Information Is Collected?</b> <div style="font-size:7px"><a href="#whatinfo">SEE MORE DETAILS</a></div></div> The "subtitle" CSS is external: Code: #subtitle { font-family:sans-serif, arial, verdana; font-size:9pt; background-color:#cccccc; padding-left:6px; } I don't understand why the "SEE MORE DETAILS" link showing up on a second line? I want it at the end of my subtitle. Thanks for your help in advance. Hello, more issues(!) I'm using "text-decoration: line-through" to cross out retail prices - catalogue style. The trouble is, when the effect is used with certain numbers like "8" and "3", the numbers become unreadable and it looks like we're charging more than the retail price on some products. My boss likes the effect, so I need to find out how to raise the height of the line-through. Does anyone know how I can do this, or any other methods (such as border control) that will be more effective. Many thanks! Hello, I have a problem that hopefully someone has seen before and found a solution. I have some text being displayed. When the text includes a image, in IE, it will repeat the last line of the text twice. so if I have this html Code: <div id="dorm_room_article_text"> <strong>HI</strong><br /> <br /> <br /> <img alt="image" src="some_image" width="525" /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> I love this game! </div> and this as the css Code: #dorm_room_article_text { float: left; clear: both; width: 100%; font-size: 95%; margin: 0 0 20px; } it will display: I love this game! I love this game! at the end, only in IE. I assume it has something to do with floats and displays but can't figure it out. Any ideas? Thanks. Hi, I'm trying to include some text within a div, but the last line always seems to fall outside the bottom border. An image of what it looks like is attached. Here's the html I'm using: Code: <div class="tbl-row <?php echo ($intRow % 2 == 0) ? ("tbl-row-odd") : ("tbl-row-even"); ?>"> <div class="title-lbl">Site: </div> <div class="title-text"><?php echo $aCols["site_name"]; ?></div> <img src="{ImgSpacer}" alt="" width="1" height="20" /><br /> <div class="contents-text"><?php echo nl2br($aCols["contents"]); ?></div> <div> <span class="subon-text"><?php echo $aCols["local_time"]; ?></span> <span class="subon-lbl"> at: </span> <span class="subon-text"><?php echo $aCols["local_date"]; ?></span> <span class="subon-lbl"> on: </span> <span class="subby-text"><?php echo $aCols["full_name"]; ?></span> <span class="subby-lbl">Submitted by: </span> </div> </div> and here's the css: Code: .contents-text { color : #F98537; font-size : 15px; text-align : left; } .tbl-row { border-radius : 15px; -moz-border-radius : 15px; -webkit-border-radius : 15px; margin-left : auto; margin-right : auto; padding : 8px; vertical-align : top; width : 96%; } .tbl-row-even { background-color : #FFEBCB; } .tbl-row-odd { background-color : transparent; } .subby-lbl { color : #F98537; display : inline; float : right; font-size : 15px; vertical-align : top; } .subby-text { color : #F0F; display : inline; float : right; font-size : 15px; vertical-align : top; } .subon-lbl { color : #F98537; display : inline; float : right; font-size : 15px; vertical-align : top; } .subon-text { color : #F0F; display : inline; float : right; font-size : 14px; vertical-align : top; } After much testing, I've found that it's the floats that seem to be causing the problem. When I take them out, the row is included within the outside div, but when I put them back in, the row falls outside. I need to keep the floats, because I would like to have the "Submitted" row aligned to the right, unless there's another way to achieve the same effect. So, does anyone know how I can have the last row right-aligned and included within the surrounding div? Debbie i wish to have two bits of text show as described in subject this is the code i have at present. i know that i have used a style for an image but how do i do this for text ? thanks Code: <style> img.floatRight { float: right; margin: 15px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 3px; } </style> left text here<b class="floatRight"> right text here</b> Like on this page, under each of the photos: http://www.sdtars.com/development/events/camp.php What causes the text to appear like: Quote: Originally Posted by In IE Officers discuss TAR Days at an executive board meeting Usiing ONLY CSS, is it possible to "justify" a block of text and have the last line centered? For example: Code: Fig. 13. Scatter diagram comparing two subspecies of Nyctimene albiventer. One individual of specimens thought to be intergrades is as large as specimens of Nyctimene a. bougainville, whereas the other three intergrades are about the same size as specimens of N. a. minor. CSS seems to only offer one or the other text-align:justify; or text-align:center; Thanks. Hi How can I wrap a long line of text inside a fixed width div? I'm not that familiar with css yet...so this might be a stupid question. I'm creating this website for my department. on the index page, there are several lists of links. between the links there is line spacing. but some link name is too long it got wrapped under. the wrapped under text also have line spacing. this makes the viewer feels that there are 2 links instead of one. how can i make the wrapped under text go right under without the line spacing? here is the link if you wanna see how it looks like now. http://www.scienceevents.uwaterloo.ca/ for example under the first left hand side menu, international year of astronmy is one link. but it looks like 2 links. how can i make them move together? this is the css for the primary nav Code: #primary_navigation { background:url(../images/primary_navigation_bg.jpg) no-repeat; /* This controls the background image on the home page. */ width:960px; height:200px; margin-top:20px; font-size:0.75em; clear:both; } #primary_navigation ul { list-style:none; margin-left:-20px; height:110px; } #primary_navigation ul li { line-height:2.0em; margin-right:5px; } I have an alignment issue that is driving me crazy. For whatever reason, the text that I have in a <span> field is dropping too far down for the last line. Here is a screenshot of the relevant text: Yada yada For whatever reason I can't keep the final "Yada" from dropping farther down. It is in the following <td> field: Code: <td style="height: 200px; width: 150px; vertical-align: top; padding-top: 10px"> And the class for the span has the following characteristics: Code: .announcement_body { color: black; font-size: x-small; } I can't see what would cause this. I've already tried adjusting the height of the <td> field without any luck. I did get consistent spacing when I added the characteristics "vertical-align: middle", but that made the distance between every line too large. Any idea what I'm missing here? Stephen Hey, Here is an example of code for one of my links where I attempted to align the link "Entry Form" to the middle of the image, what am I doing wrong? Code: <p class="NavigationOption" id="Nav_Entry" line-height=32px text-align=middle><img src="../links/entryform.jpg" border=0></img> <a class="NavigationLink" id="NavLink_Entry" href="<?= ptpr; ?>members/index.php"><font color= #555555>Entry Form</a></p> |