473,651 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<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 3578
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")
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
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
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
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
Jul 12 '07 #4
On 2007-07-12, Bob <bo*@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.
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:absolu te 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: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
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: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.
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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
3392
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to <foo/>) From XHTML specification:
4
5043
by: Ian Rastall | last post by:
This really is a JavaScript question. I have a site that looks fine in everything but NN4. I'm afraid I don't have a URL, because the site is very much unfinished. The site is a header (which is a table) and a main <div> underneath that. The main <div> is set to have a top margin of 3%, which works fine, except in NN4. There, it looks like it has a margin of 20%, or even larger. I couldn't fix it with the @import hack, so I thought I...
61
24461
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will 'stretch'</td> <td valign="top" width="300">some data that won't 'stetch'</td> </tr> </table>
3
3806
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644" onclick="__doPostBack('SitesRadioButtonList_3','')" language="javascript" />
28
5350
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the </p>s included as well. <P>aaaaaaaaa</p><DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</p></DIV>
5
13479
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as semantically meaningless containers for bunch's of other elements - like everyone keeps telling me to make my code standards compliant. This request is not because I want a fix, but because I want to
2
9445
by: bgold12 | last post by:
Are there any non-semantic (i.e. actual) differences between the <p> tag and the <divtag?
8
609
by: CJM | last post by:
I've inserted a new banner in an existing page and I want the banner image to be centered (horizontally) within its container. I'm not bothered whether the accompanying line of text is restricted to the width of the image and centered, or whether is simply fills the width of the container. I've tried various things to achieve this (e.g setting margins to auto) but I'm not having much luck. The URL for the page is: http://www.eminox.es
8
10029
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF editor. A fellow member of the PCG has helped me by creating a bit of Javascript to emulate the scrolling and using Google I've now gotten it into a state where it almost passes the W3C Markup Validation Service. However, the one error, Error Line 166,...
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.