469,912 Members | 1,727 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,912 developers. It's quick & easy.

<DIV> with a justify and padded text into

Bob
He at all

I have a <DIVwith a long text and a <buttonat the very bottom

I want to center the button and to justify the text and I want the
text-margin-left and right of 2em relative to the <divnargin

How can I make the CSS please?

Regards
Jul 12 '07 #1
11 3446
Scripsit Bob:
I have a <DIVwith a long text and a <buttonat the very bottom
I'd like to ask "why?" and "what's the URL?", but I'm afraid to ask. I still
have belief in the rationality of web authors left.
I want to center the button and to justify the text and I want the
text-margin-left and right of 2em relative to the <divnargin

How can I make the CSS please?
Is this an exercise? Can we send the replies directly to your teacher or
tutor? Then we could explain why it's a wrong exercise.

Here's a correct answer though (to the extent that wrong questions can have
right answers):

div { text-align: justify;
margin: 0 2em; }
button { display: block;
margin: 0 auto; }

To see one of the reasons why justification is seldom justified on web
pages, test this with a div containing nice long words like
supercalifragilisticexpialidocious, and use different window widths.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jul 12 '07 #2
Bob
"Jukka K. Korpela"
wrote without understand my idea
Is this an exercise? Can we send the replies directly to your teacher or
tutor? Then we could explain why it's a wrong exercise.

Here's a correct answer though (to the extent that wrong questions can
have right answers):

div { text-align: justify;
margin: 0 2em; }
button { display: block;
margin: 0 auto; }

To see one of the reasons why justification is seldom justified on web
pages, test this with a div containing nice long words like
supercalifragilisticexpialidocious, and use different window widths.
Dear Mr."I know all",

It is not an exercise but only a little part of my site
I do not speack well your language but also you do not speack my
language.......................................... .
One time ago this NG was very kindly and there was not teachers like you
but only
friends........................................... ...............................
The code (right) that you wrote
do not work like my idea !!!!!!!!!!
Into the <divI'ld want some justify text
The margin is of the text and not of the div and my problem is to position
the text into the div and button must be centered into the div
At last I am looking for a position absolute of the text and of the button
into the div
Many regards
Jul 12 '07 #3
Bob wrote:
"Jukka K. Korpela"
wrote without understand my idea
>Is this an exercise? Can we send the replies directly to your teacher or
tutor? Then we could explain why it's a wrong exercise.

Here's a correct answer though (to the extent that wrong questions can
have right answers):

div { text-align: justify;
margin: 0 2em; }
button { display: block;
margin: 0 auto; }

To see one of the reasons why justification is seldom justified on web
pages, test this with a div containing nice long words like
supercalifragilisticexpialidocious, and use different window widths.

Dear Mr."I know all",
A poor choice of response from someone who wants help...
>
It is not an exercise but only a little part of my site
I do not speack well your language but also you do not speack my
language.[...]
One time ago this NG was very kindly and there was not teachers like you
but only friends
Teachers *are* our friends. *Especially* for those who wish to learn.
The code (right) that you wrote do not work like my idea ![...]
Into the <divI'ld want some justify text
The margin is of the text and not of the div and my problem is to position
the text into the div and button must be centered into the div
At last I am looking for a position absolute of the text and of the button
into the div
Perhaps you should provide a URL of your best attempt so far. I actually
thought Jukka's post accurately fulfilled your request while at the same
time explaining the pitfalls of doing what you said you wanted. So
that's at least two of us who didn't understand. Even on your second
attempt I don't get it. But if you try again, you might get more help if
you're nice about it.
Many regards
More of the same to you.

--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
Jul 12 '07 #4
On 2007-07-12, Bob <bo*@nospam.comwrote:
"Jukka K. Korpela"
wrote without understand my idea
>Is this an exercise? Can we send the replies directly to your teacher or
tutor? Then we could explain why it's a wrong exercise.

Here's a correct answer though (to the extent that wrong questions can
have right answers):

div { text-align: justify;
margin: 0 2em; }
button { display: block;
margin: 0 auto; }
[...]
do not work like my idea !!!!!!!!!!
Into the <divI'ld want some justify text
The margin is of the text and not of the div and my problem is to position
the text into the div and button must be centered into the div
Use padding instead of margin for that. So "padding: 0 2em;"

The button should be centered OK with the CSS given.
At last I am looking for a position absolute of the text and of the button
into the div
Not sure what you mean.
Jul 12 '07 #5
Bob
"John Hosking"

wrote:

A poor choice of response from someone who wants help...

Help?

It is a very strange way to help
>
Perhaps you should provide a URL of your best attempt so far. I actually
thought Jukka's post accurately fulfilled your request while at the same
time explaining the pitfalls of doing what you said you wanted.
.................................................. .............................
John

I have not still now wrote anything to show you because I do not understand
how to start.

My last idea was to position absolutely any thing (text, button, images
ecc....) into the <divbut I cannot understand how to do.

I positin best the div into the windows but not the element of the div into
the div

Regards
Jul 12 '07 #6
Bob
"Ben C"

wrote:
Not sure what you mean.
Thank you very much but what I want is different.

I know perfectly that it is very difficul for me to make questions in other
language.

I'ld like to know if it is possible to make a position:absolute of any
element like text or buttons or images INTO a <DIV>

Thank you in advance and best regards to all
Jul 13 '07 #7
Bob wrote:
>
I'ld like to know if it is possible to make a position:absolute of any
element like text or buttons or images INTO a <DIV>
You can absolutely position anything, but that doesn't mean it is a wise
thing to do, or that it is really the best way to go about it.

We understand there is a language barrier here, so why don't you draw a
picture of what you want? Do a "mock up" in a graphics program, upload
it to a publicly accessible server and post the URL.

--
Berg
Jul 13 '07 #8
On 2007-07-13, Bergamot <be******@visi.comwrote:
Bob wrote:
>>
I'ld like to know if it is possible to make a position:absolute of any
element like text or buttons or images INTO a <DIV>

You can absolutely position anything,
[...]

Pretty much, yes, but you can't absolutely position a #text node, and
although you can absolutely position an inline node (e.g. a span) as
soon as you do it becomes implicitly display: block.

Absolutely positioning table cells is a bad idea too.
Jul 13 '07 #9
Ben C wrote:
>
Absolutely positioning table cells is a bad idea too.
Note that I did mention positioning isn't always wise. ;)

Seems more often than not, it's unwise.

--
Berg
Jul 13 '07 #10
In comp.infosystems.www.authoring.stylesheets message <7gMli.63953$%k.20
04**@twister2.libero.it>, Fri, 13 Jul 2007 14:47:31, Bob
<bo*@nospam.composted:
>
I know perfectly that it is very difficul for me to make questions in other
language.
Then write in both Italian and English.

--
(c) John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
In MS OE, choose Tools, Options, Send; select Plain Text for News and E-mail.
Don't quote more than is needed, and respond after each quoted part.
Jul 14 '07 #11
Bob


The <divthat I want to do is like the <duvthat appair into this page
http://www.dpopup.com/

If you scroll the page it appair a fixed position <divthat is like a
windows with a button

Best regards

(at all)
Jul 20 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ian Rastall | last post: by
61 posts views Thread by Toby Austin | last post: by
3 posts views Thread by Josef K. | last post: by
28 posts views Thread by Kent Feiler | last post: by
2 posts views Thread by bgold12 | last post: by
8 posts views Thread by CJM | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.