text-alignment

vertical align pseudo element in list navigation

自作多情 提交于 2019-12-24 00:25:21
问题 I've created a list style navigation and each hyperlink can be multiple lines, after each hyperlink element I added a pseudo element 'arrow' after, would it be possible to align the pseudo element vertically regardless of the hyperlink height? The requirement would be for this to work in IE8 & above. The Mark-up: <ul> <li> <a href="#"> <h3 class="title">Cover</h3> <p class="subtitle">Lorem ipsum dolor sit</p> </a> </li> <li class="current"> <a href="#"> <h3 class="title">Lorem ipsum dolor sit

Jasper Report : Aligning text as center in text field using HTML markup

半世苍凉 提交于 2019-12-23 17:12:55
问题 I have created a Jasper Report to display text retrieved from DB. The text is in the HTML format. I have a requirement to style and align the text when displaying in PDF. This is a sample HTML text from DB <html> <p><b>This is Bold text</b></p> <p> This is a paragraph whith indent</p> <p>This is a paragra with no indent</p> <p><center>This text should be centered</center></p> <p><font size="4">This text should be of font size 4</font></p> </html> The bold and paragraphs tags works fine. But

3.1.4 textAlignment is missing ( Android Studio)

被刻印的时光 ゝ 提交于 2019-12-22 08:46:46
问题 I have the new Version of Android Studio (3.1.4), but I can't find textAlignment. I've already searched in "View all Attributes". Do somebody now where I can find it. Thanks for answering! 回答1: Here's how I resolved the problem (on Android Studio 3.3 - Build #AI-182.5107.16.33.5199772, built on December 25, 2018): In Android Studio, open build.gradle (Module: app) . Look for minSdkVersion Changing this to 17 (from 15) did the trick for me. I suggest you try the same, unless you really need it

How can I horizontally center a button element in a div element?

纵饮孤独 提交于 2019-12-20 09:27:52
问题 I don't want to add CSS to my div element (e.g. <div style="text-align: center;"> ). I only want to add CSS code to the button element. <div> <button>Button</button> </div> How can I center the button horizontally in this case? 回答1: button { margin:0 auto; display:block; } button { margin: 0 auto; display: block; } <div> <button>Button</button> </div> 回答2: Others have already mentioned the margin: 0 auto; method, but if you wanted an explanation, the browser splits up the available space in

Toolbar header's item alignment issue?

旧时模样 提交于 2019-12-20 07:37:32
问题 Today i have stucked in one of the weird problem in Toolbar custom header. I am using the TextView in the center and ImageView which is at the right of the Toolbar . So i have used below lines of code in xml , please check it once. <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/white" android:theme="@style/AppTheme.NoActionBar.AppBarOverlay"> <LinearLayout xmlns:android="http://schemas

Could be Text orientation of JTextArea changed by keyboard shortcut?

一笑奈何 提交于 2019-12-20 03:38:26
问题 A JTextArea has componenent orientation set to LEFT, so text is written from left to right. Sometimes, it happens that while the user is writing, the text orientation suddenly changes to right, so all the text appears aligned to right. I can't explain why this happens (I have no direct feedback by users), but I guess that, while the user is typing, he activates some keyboard shortcut which changes the text orientation. Does someone know how this can happen? Can be there something else which

Cross-browser CSS for left align and right align on the same line

拈花ヽ惹草 提交于 2019-12-20 02:56:28
问题 Cross-browser CSS that works to allow both left and right align of text on the same line? Example (where each text quote should be aligned as far left or right as possible, respectively): stuff on the right stuff on the left No float's answer's please.. unless there is a way to make the text not break out of the parent div/container in a multicolumn css page... 回答1: With container tags: <div> <p style="float: left">stuff on the left</p> <p style="float: right">Tstuff on the right </p> </div>

Right-align text in Emacs

对着背影说爱祢 提交于 2019-12-18 15:54:35
问题 Sometimes, I have a text file like this in Emacs: some text 123 17 other text 1 0 still more 12 8 last one 1234 123 I would like to right -align the numbers (using spaces), changing it into something like this: some text 123 17 other text 1 0 still more 12 8 last one 1234 123 How can this be done in Emacs? 回答1: align-regexp can do this. Mark the region, and then use: C-u M-x align-regexp RET \(\s-+[0-9]*\)[0-9] RET -1 RET 4 RET y That should be the simplest approach. ( Edit: In fact, you don

Swift : align UILabel text in the top rather in the middle

邮差的信 提交于 2019-12-18 11:33:30
问题 I want the UILabel to start from the top even if the text is short it seems that NSTextAlignment doesn't work cell.textContent.text = comments[indexPath.row] cell.textContent.textAlignment = func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { //post's section == 0 if indexPath.section == 0 { let cell = tableView.dequeueReusableCellWithIdentifier("postCID", forIndexPath: indexPath) as! postCell cell.usernameLabel.text = "Steve Paul Jobs"

Python: String Formatter Align center

我的未来我决定 提交于 2019-12-17 19:41:40
问题 print('%24s' % "MyString") # prints right aligned print('%-24s' % "MyString") # prints left aligned How do I print it in the center? Is there a quick way to do this? I don't want the text to be in the center of my screen. I want it to be in the center of that 24 spaces. If I have to do it manually, what is the math behind adding the same no. of spaces before and after the text? 回答1: Use the new-style format method instead of the old-style % operator, which doesn't have the centering