Html Input boxes must be in the same line - html

Do you see the rec tangled red text box which is under "Acil Durumda Aranacak Kişi",
I want that text box just near "212" since they are both for telephone number...
How can I do that?
alt text http://img529.imageshack.us/img529/1058/rrrrzh.jpg
PS: All the html text boxes, and inputs are created by c# code...

Use the nowrap on the TD tag, eg
<td class="TaskForField" valign="top" nowrap="nowrap"> ... </td>

you can use the css property float:left; for both of them even if I suggest you first to give us some code.

The easiest way would be to add a text value of " " (i.e. an empty space) to the label immediately before the 2nd telephone control.
This should add a non-breakable space into the span element (the .net label) before the input element (the 2nd telephone textbox control) which would cause it to display in the browser and occupy the same space as the other labels - thus aligning the textbox control with the others.
Failing that you could define a class in your stylesheet with a margin-left property and then apply this to your textbox using the cssClass property.

Related

SSRS horizontal alignment in a straight line

I'm new to SSRS and I'm unable to align the sentence horizontally in a straight line in SSRS using HTML tag.
I've got a very long word and I want it to fit in a line. I tried using can grow in SSRS but it expands the text box in a vertical manner with the word moving to the next line. However, I want the words to fit in a horizontal line and the extra to be visible as long as the text box holds.
Is there any HTML tag/code in SSRS which would help me achieve the same?
SSRS only supports a very limited set of HTML tags, so HTML is often not that helpful to format your text.
From this MSDN article, the list of supported tags are:
Hyperlinks: <A HREF>
Fonts: <FONT>
Header, style and block elements: <H{n}>, <DIV>, <SPAN>, <P>, <HN>
Text format: <B>, <I>, <U>, <S>
List handling: <OL>, <UL>, <LI>
So we can achieve the result you are after (that is, show as much of the text as possible in the horizontal confines of the text box) by combining the <DIV> HTML element with non-breaking spaces.
To do this, follow these steps:
Set the cell's CanGrow property to False so it won't expand vertically
Set the cell's Markup Type to be HTML - Interpret HTML tags as styles
Enclose the field's text in <DIV> tags and replace the spaces in the text with non-breaking spaces by setting the cell's expression to:
="<DIV>" & Replace(Fields!FieldName.Value, " ", "&nbsp") & "</DIV>"

Adding space between image and text in QPushButton

I have a rich text button, which is a descendant of QPushButton and uses QTextDocument for limited HTML support. I need to create a button, which has an icon on the left and a caption on the right (with some space between image and text).
So, let's assume that we have set_html(const QString& html) method. I failed to add the space between image and text via style attribute (with margin) in img tag. What will be the input string for that method?
You can try the following verbose workaround (due to limited HTML support in QLabel):
<table><tr><td><img src=":/save_monitor_settings.png"/></td><td style="padding-left:10px;">Some text</td></tr></table>

Why doesn't the `href` attribute on the `<td>` element work?

I've set up a fiddle with a table.
You see, Im trying to make a table where the user will hover and click the td to show an id. Check the fiddle out and you'll understand.
Now, When the user hovers Parent4, you may notice there's space on the table where there's no text and the user can't click it so the Child4 wont appear....
Now, is there any way I can make the space where there's no text clickable so it shows up child4?
I tried
<td ahref="#child4"> but didn't work...
////?EDIT As its a bit confusing...
I need you to see the fiddle.
You can see the cell for Parent4 is bigger than the text. So when the user hovers on the cell I want the text to change color and the cell to change color too + if the user clicks the cell Child4 won't appear because a cell is unclickable, so My question, how can I make the cell clickable to display Child4?
UPD:
I didn't update the fiddle, but it's now up to date.
The href property is designed for anchor elements (<a/>). "ahref" as you've put should be <a href="">. a is an element of its own, not a HTML attribute, and href is an attribute it accepts.
To make the text of a td clickable you can simply put an anchor within it:
<td>
My clickable text
</td>
Edit: To fix this now that the question has been added, simply add in the following CSS:
td a {
display:block;
width:100%;
}
What this does is display the anchor tag as a block, allowing us to adjust the width, and then set the width to 100%, allowing it to fill the remaining space.
Working JSFiddle.
Add the onClick event on the td mark.
<td onClick="document.location.href='http://www.yoursite.com';"> some text here </td>
There is a very simple way of doing this with just HTML. Put the link text inside a DIV. The DIV occupies the whole TD and makes it all clickable.
<a href="http://whatever.com">
<div>
Link Text
</div>
</a>
If you're trying to make an area clickable with no text, you can define the size of the tag like so:
This will create the block without any object or text inside.
Just wanted to add two ways that actually worked inside the for me:
Using Angular 5:
a. in [yourname].component.html:
<table id='myTable'>
<tr><td (click)="myClick()">my cell</td>...
b. In [yourname].component.ts: (inside your exported class.. )
simply implement the needed function..
export class [youyname].... {
....
myClick() {
}
}
Pure JS:
<script>
function myClick(){
console.log("got here");
// Do Whatever you want
}
</script>
<div id='myDiv'>
<table id='myTable'>
<tr><td onClick="myClick()">Yo..</td><td>....
The easiest way..
(Note: It's possible to put the script inside the tag, or even load an external JS file inside it, but I don't like doing it like that.)
Very Simple way is just adding onClick='myFunction()'
Ex:
<table>
<tr>
<td onClick="myFunction()">hello</td>
</tr>
</table>
If using pug/jade try the following;
tr(onclick="document.location.href='http://www.google.com';")
td.py-2.align-middle
Simplest thing would be to populate the "empty" cell with:
That should do the trick for you.

Unable to Style checkbox in IE

I have a table column in which, a checkbox is followed by a label. A sample HTML code is :
< td class = "namecell" >< input type="checkbox" class = "checkboxclass" value="cs1" /> < label class = "celllabel" id = "nlcs1" >lable data < /label> < /td>
However in IE the checkbox and the label are not aligned in the same line. The label goes into next line this is affected the look and the overall alignment of the page. However this isn't a problem with other browsers like Firefox and Chrome.
I tried specifying width and height but couldn't solve the problem. I basically want both the checkbox and the label to be on the same line.
Does anyone has previously faced such a problem. Help needed.
In general a non-breaking space suffices somewhat.
<td class="namecell"><label
class="celllabel"><input type="checkbox" class="checkboxclass"
value="cs1" /> lable data </label></td>
Two ways that work:
Use the attribute nowrap="nowrap" (or just nowrap when not using XHTML) in the td tag.
Wrap the contents of the td element inside nobr markup:
<td ...><nobr>...</nobr></td>
Someone might complain that nowrap has been deprecated and that nobr is nonstandard, but they are tools that actually do the job. In this case they both seem to work, but in general, nobr works in some cases where nowrap doesn’t.
Using (or an actual no-break space) doesn’t help. In fact the checkbox and the label may get displayed on separate lines even when no space intervenes, unless you use the methods mentioned.
Using white-space: nowrap in CSS (on the td element) should help by the CSS 2.1 spec, but it does not work in practice.
The problem appears only when there is something that prevents browsers from expanding the cell width to accommodate its content on one line. This might be a width specification, for example. Note that forcing the checkbox and the label on the same line may cause the with specification to be overridden.

HTML: Swap TextBox for plain text but maintain layout

For a readonly view, I want to swap textboxes for plain text (because it looks nicer than disabled textboxes.
However, plain text doesn't have the same margin/border/padding values, so the text no longer aligns with labels, where the textbox did.
What's an appropriate technique for making the plain text still line up with the existing label?
Put it in an display:inline-block div. vertical-align:baseline might help as well. Depending on the markup of the label you would need to change the label to an inline-block as well.
(If you could provide some markup it might be easier to assist. jsfiddle maybe?)