CSS - How to break a line only at division borders - html

I have the following code
http://jsfiddle.net/yXwh9/3/
and the result is
http://jsfiddle.net/yXwh9/3/embedded/result/
The problem is that the first line is broken and "Techconnect is a group where we discuss about " comes in first line and "technology,languages,platform,development and IDE and front end development".
On the second line, I don't want this to happen. I want the line to break up exactly at the right boundary of the containing division. (I dont want <pre> as a solution, just because the text may not contain <br/> inside.)

You are probably looking for text-align: justify. Example.

Related

HTML tag or technique like <wbr> but for a line break?

I often find I wish to control how a sentence breaks/wraps, e.g.:
Hello there Mr Nemesis X, welcome to the interwebs!
If the viewport is narrow, I would like it to wrap after the comma, so the two logical lines are together:
i.e. GOOD: Only if the viewport is too narrow to show the whole screen
Hello there Mr Nemesis X, |<----- viewport width
welcome to the interwebs!
BAD:
Hello there Mr Nemesis X, welcome to the |<----- viewport width
interwebs!
At the moment I place the two sentences in two <span>s, and use flex to ensure they wrap together, what a mission for something I often do. I learnt about <wbr>, which sounds like it could work if I replace all the spaces with say , but its not what it was defined for. Theres <br>, but that always breaks. So I am looking for something like a "line break", say <lbr> (doesnt exist), which if the line needs to wrap, it says hey, heres a good place to break the line.
You maybe can use \n after the coma.
The way your code is breaking right now is accurate to a break. The <wbr> is used to break a long word up hence why you would need to add that HTML entity to break up your lines.
For what I think you want, going for that specific design aesthetic, breaking at a comma, you would need to pre-process your strings before they get written, and as the view-port updates as to add breaks where you deem necessary.
You can use a <br> html tag to break a line!
Inserting the line break tag after the comma.
Or you can use the /n after the comma.

PhpStorm first line doesn't follow "Align consecutive assignments" setting

I have a little question while you having a break from coding.
I have set the "Align consecutive assignments" in PhpStorm.
For some reason sometimes the first line of a variable definition block is a little bit unaligned. Screenshot attached.
Basically my question is: Why is the = sign of the first line not aligned with all the following lines which are properly aligned after reformat.

entering a new sentence without using <br> or <p>

If there are a number of links on a webpage, is it possible to break onto a new line while the link is either fully on either side?
For example: This blog http://northskie.blogspot.com/ shows a series of links using the standard A HREF="http://www... " etc .
But, you'll notice that on the first line, Chapin's Inferno appears on BOTH sentence line A, AND line B. This could easily be corrected by adding a BR, of course. BUT, what if I'm working on a huge number of links, such as http://asmrluv.blogspot.com/ ? Now, I'd prefer NOT to to simply add BR or P between each Breaking line. Also note, many sites could be added to the list later. This is why BR lines should be avoided here.
Can any code be implemented which automatically prevents a link from appearing on both lines? (of course, adding a CLASS or ID would along with code would be acceptable). I'm trying to avoid the problem of a link appearing halfway on one sentence, then on the next line as well.

Is Line of code also Line of text?

I know this maybe a silly question I'm quite confuse about them, as I understand this example has 1 line of code and 2 line of text.
1. System.out.print("-----------
2. ----------------------------"};
Am I right or wrong?
For java I usually define lines of code as the number of non-text semi-colons and right parenthesis.

Forcing items to stay on same line

This should be fairly simple, but I have not been able to find anything usefull when google-ing.
What I have is some text and some icons that I want to ensure that stays on the same line. For example I want this:
Text goes here and eventually we run into the end of the line [text][icon]
or this:
Text goes here and eventually we run into the end of the line
[text][icon]
but not this:
Text goes here and eventually we run into the end of the line [text]
[icon]
The only thing I've been able to come up with when google-ing is that apparently IE has some problems implementing this. I don't really care if IE is able to do it or not (at least not yet), I just want to find a solution... :)
Put it in a container with no-wrap specified for the whitespace property in the stylesheet.
You need to use non-breaking spaces, coded to prevent breaks in the spaces between.
Consider using the non-breaking space instead of space between the last word(s) and the icon.
For example:
Text goes here and eventually we run into the end of the line [text] [icon]
instead of
Text goes here and eventually we run into the end of the line [text] [icon]