<DIV> with a justify and padded text into

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    <DIV> with a justify and padded text into

    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


  • Jukka K. Korpela

    #2
    Re: &lt;DIV&gt; with a justify and padded text into

    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
    supercalifragil isticexpialidoc ious, and use different window widths.

    --
    Jukka K. Korpela ("Yucca")


    Comment

    • Bob

      #3
      Re: &lt;DIV&gt; with a justify and padded text into

      "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
      supercalifragil isticexpialidoc ious, 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


      Comment

      • John Hosking

        #4
        Re: &lt;DIV&gt; with a justify and padded text into

        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
        >supercalifragi listicexpialido cious, 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

        Comment

        • Ben C

          #5
          Re: &lt;DIV&gt; with a justify and padded text into

          On 2007-07-12, Bob <bob@nospam.com 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; }
          [...]
          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.

          Comment

          • Bob

            #6
            Re: &lt;DIV&gt; with a justify and padded text into

            "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


            Comment

            • Bob

              #7
              Re: &lt;DIV&gt; with a justify and padded text into

              "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:absolu te of any
              element like text or buttons or images INTO a <DIV>

              Thank you in advance and best regards to all


              Comment

              • Bergamot

                #8
                Re: &lt;DIV&gt; with a justify and padded text into

                Bob wrote:
                >
                I'ld like to know if it is possible to make a position:absolu te 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

                Comment

                • Ben C

                  #9
                  Re: &lt;DIV&gt; with a justify and padded text into

                  On 2007-07-13, Bergamot <bergamot@visi. comwrote:
                  Bob wrote:
                  >>
                  >I'ld like to know if it is possible to make a position:absolu te 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.

                  Comment

                  • Bergamot

                    #10
                    Re: &lt;DIV&gt; with a justify and padded text into

                    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

                    Comment

                    • Dr J R Stockton

                      #11
                      Re: &lt;DIV&gt; with a justify and padded text into

                      In comp.infosystem s.www.authoring.stylesheets message <7gMli.63953$%k .20
                      0407@twister2.l ibero.it>, Fri, 13 Jul 2007 14:47:31, Bob
                      <bob@nospam.com posted:
                      >
                      >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.demo n.co.uk Turnpike v6.05 MIME.
                      Web <URL:http://www.merlyn.demo n.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.

                      Comment

                      • Bob

                        #12
                        Re: &lt;DIV&gt; with a justify and padded text into



                        The <divthat I want to do is like the <duvthat appair into this page


                        Great domain names provide SEO, branding, and a memorable experience for your users. Get a premium domain today.




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



                        Best regards

                        (at all)


                        Comment

                        Working...