Sometimes we may have such content in our web page:
A: How's everything going on?
B: Fine, thank you!
When the sentence is longer, it will be like:
A: How's everything going on? I haven't heard from you for a
long time. I missed you so much.
B: Fine, thank you!
But the desired style is:
A: How's everything going on? I haven't heard from you for a
long time. I missed you so much.
B: Fine, thank you!
Is it possible to do this with:
do not use a <pre> tag.
can fit any width.
plenty of ways to do that, my preferred way is using a definition list like so:
<dl>
<dt>How's everything going on? I haven't heard from you for a
long time. I missed you so much.</dt>
<dd>Fine, thank you!</dd>
<dt>How's everything going on? I haven't heard from you for a
long time. I missed you so much.</dt>
<dd>Fine, thank you!</dd>
<dt>How's everything going on? I haven't heard from you for a
long time. I missed you so much.</dt>
<dd>Fine, thank you!</dd>
</dl>
http://jsfiddle.net/j5v62t3n/
So many ways :)
.parent{
width: 200px;
display:flex;
font-family: sans-serif;
}
.parent>div{
padding: 0 5px;
}
<div class="parent">
<div>
A:
</div>
<div>
How's everything going on? I haven't heard from you for a long time. I missed you so much.
</div>
</div>
Related
I would like to know what's the effect of "ui-g-nopad".
I see it a lot in the code of an application and I can't understand what it does exactly, cause the result is always the same if I put it or not.
<div class="ui-g ui-g-nopad">
...
</div>
I read doc (https://www.primefaces.org/showcase/ui/panel/grid.xhtml) but it's not really explicit neither...
Thank you for your help.
from the primeng.css file:
.ui-g-nopad {
padding: 0;
}
This means it uses CSS to set padding to zero.
You can see it here. Does anybody have any ideas why this might be happening?
http://www.tombalding.com
You can see it at the top.
I found the answer, you have the code twice in your html, delete one and you'll be fine ;-)
I mean this one: <img src="https://www.google.com/images/cleardot.gif" class="goog-te-gadget-icon" style="background-image: url(https://translate.googleapis.com/translate_static/img/te_ctrl3.gif); background-position: -65px 0px;">
Hope I helped!
This is the code:
<form id="the_form" action="">ev
</div>
<!-- final pay_block -->
<div class="linea"/>
<div class="spacer"/>
the linea is overlapping the buy button, now is in the middle because there is margin-bottom: 15px aplied.
Edit:
This is the site: http://tinyurl.com/cboyymm
also what I want is to display the pay button in the same position. I left space enough to product description, and I fixed a height to the diferents divs before. Is this the right thing? I want to make it in the most minimalism way. Tips are very welcome, as Im using this project to learn.
Thanks in advance. At first I was afraid of posting things here because I didnĀ“t want to mess, and Im quite ashame Im so nob. But I found a very warm welcome. Dont want to abuse, just know why this little things happen.
Now define min-height
#pay_block {
min-height: 78px; // add this line
height:78px; // remove this line
}
Line No :- 612 in this css file tienda1.css
Result is this
i am trying to validate someone else's code here and they are using the xhtml1-strict DOCTYPE.
i am almost there; except for few erors...
There is no attribute "sid"
Element "iframe" undefined
For the SID attribute issue, this is what they have:
<li class="drop" sid="nav_products"> <span class="head">Our Products</span>
<ul id="nav_products" style="display: none;">
<li>Toys</li>
<li>Tools</li>
<li>Beauty</li>
<li>Electronics</li>
</ul>
</li>
And because of the IFRAME error, i am also getting 2 more errors:
there is no attribute "src"
there is no attribute "style"
<h2>Read The Latest News</h2>
<iframe src="http://p.p0.com/YesConnect/HtmlMessagePreview?a=TiTnp" style="width:100%; height:4350px; border-collapse:collapse; border:1px solid #ccc; padding:10px 0 0"></iframe>
Can anyone PLEASE help me fix these errors? I am not an expert in this area, so you will have to explain a bit the solutions. Thanks a lot in advance for your time and help!!!
The question to ask is probably why the previous developer was using "sid" in the first place. As far as I know, attribute "sid" will never validate in any XHTML doctype, so it's a good idea to change it to "class" or "id", and then change the code that relies on "sid" accordingly.
Okay, so I was googling for solutions and found this site that kind of answered my questions on iframe
http://madskristensen.net/post/Use-iframes-with-XHTML-10-Strict.aspx
So I ended up changing the DOCTYPE for that one page to "XHTML 1.0 Transitional" from "XHTML 1.0 Strict" and that fixed all 3 errors I was getting for using iframe. Hope this info helps someone :)
however, i am still stuck with the error for sid, any help will be greatly appreciated!
UPDATE:
This answer is almost 6 yrs old, and looks like since then few things have changed :P As Davide Andrea had pointed out, the above link doesn't work anymore, some of you might find this answer helpful: https://stackoverflow.com/a/8265544/1081016
code
Hello how are you
output
Hello how are you
Why it's not rendering like this I need like this.
Hello
how
are
you
how to achieve output like this without changing in HTML?
<p style="width:165px;height:80px;border:1px solid red">
Hello how are you
</p>
See live example here http://jsbin.com/amozu4
i need link like this
Hello
how
are
you
<a style="width:40px;display:inline-block;">
If you're going to render a list, then make it a list. Even if it means repeating the link for each item.
<ul style="list-style:none;">
<li>london</li>
etc
The advantage of this is that you can also at any time make it a sentence, by making all li elements display:inline.
you can get that using this :
a { white-space:normal;}
Adding display:block;width:40px;white-space:normal works for me.