Dagoth Nereviar
Mar 5 2007, 12:11 AM
Basically, I have a list (like shown below) but as you can see, some parts stick out more than others, and it doesn't look ordered. What I wish to know is if it's possible to justify the text so it's ordered, but also keep it in the centre, using CSS  Although if another coding language needs to be used, then that's ok Example:Beginning with A Beginning with O Beginning with V Beginning with W Beginning with I Beginning with M Beginning with P (Random letters to show how I mean easier  without going through the whole alphabet) Thanks to any who reply 
Reply
BuffaloHELP
Mar 5 2007, 01:02 AM
What you mean by "ordered" as in it's not aligned with each other at all? This cannot be possible using just CSS or anything else because the character width of each letters, i.e. A, O, V, W, I, M and P. The simplest way to resolve the alignment issue is to create LETTERS in graphics with all of them having the same width and height. The method you should try is to align "Beginning with" and let LETTERS drift off Beginning with A Beginning with O Beginning with V Beginning with W Beginning with I Beginning with M Beginning with P And these would be enclosed within a DIV or TABLE and centered to a page... The complicated way is to use CSS to set LETTERS as the same width with same space apart. But you may end up with 26 different cases to align them all in a line, not to mention they may not look all the same (some wider than others).
Reply
kraizii88z
Mar 5 2007, 02:15 AM
The only thing i could think of would be to justify a table and center it.
Reply
rvalkass
Mar 5 2007, 06:28 AM
I would put the entire list in a DIV, and set the text alignment within the DIV to justify. This will (obviously) justify the list. Then, if you set the left and right margins of the DIV to auto, then it will centre align the DIV within the parent element. This should give the look of a centre-aligned, justified list. I've tried it and it does work, although you have to fiddle around with the width of the DIV to get the look you want.
Reply
jlhaslip
Mar 5 2007, 07:19 AM
Is this any better? Adjust the spacing by increasing the margin on the class. CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>An XHTML 1.0 Strict standard template</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link type="text/css" rel="stylesheet" href="./w3c_suggested.css" media="all" />
</head> <style type="text/css">
.box { margin: 0; padding: 0em;
} .centre { margin: 0 2em; text-align: center; } </style>
<body>
<div class="box"> <p class="box" >Beginning<span class="centre">with</span> A</p> <p class="box" >Beginning<span class="centre">with</span> C</p> <p class="box" >Beginning<span class="centre">with</span> V</p> <p class="box" >Beginning<span class="centre">with</span>W</p> <p class="box" >Beginning<span class="centre">with</span> I</p> <p class="box" >Beginning<span class="centre">with</span> M</p> <p class="box" >Beginning<span class="centre">with</span> P</p> </div> </body> </html>
I placed a "non-breaking space" in the narrow glyphs and two in the "I". No adjustment to the 'W'. Might work?
Reply
Dagoth Nereviar
Mar 11 2007, 09:03 PM
Thank you for all the replies  My idea was to use a div, and then a table to align it, which looks like I will have to do. I'll have to have the heading in a different div too, or else it won't work, right?
Reply
jlhaslip
Mar 11 2007, 11:38 PM
Just a reminder that tables do, in fact, have their uses, although it would appear that you are using the table in a structural way to format the data and that is not what tables are designed for. Using a table for this task is not "semantic" and alternatives should be considered.
Reply
Recent Queries:--
text alignment codes around pics - 14.48 hr back. (1)
-
text-align center-justify - 168.10 hr back. (2)
Similar Topics
Keywords : align, text, center, justify, inside
- Text Size Problem
(6)
Align Text Column Without Tables Using Css
Is it possible to get a 3 column alignment without using tables with C (13) I know I can use tables to get this effect but I am not sure if CSS can do it. I have not found any
examples so far, the only alignments with CSS I have come across are whole div elements and nothing
for inside formatting like tables offer. Heres my current stage of my layout so far. select a
character to see output. http://sonesay.trap17.com/chars.php
http://sonesay.trap17.com/profile.css The attached file is of my original plan but at this stage
I cannot do a php+ajax pagination for characters because of lack of knowledge so I went with the
simple drop down lis....
Need Help On "global News" Problem.
Change paragraph of text with CSS style change? (7) I am making a website for my IT Support class and a program called "Cox Connects Kids" for my
mid-term assignment. Now I have the whole layout made and I will post a screen shot down lower. My
basic problem/question is this: I have a right section of the page(A div) and it is supposed to be
a global news part that shows the same on every page(I.e. home,contacts,help) and I was wondering if
I can somehow edit my CSS file to have it in there and just change it the one time for all the
pages. I am guessing there is some way to do this but I couldn't figure it out. I....
How Can I Indent Text A Specified Amount
(every line, not just the first) (4) Hey all I'm working on several pages in HTML using external CSS formatting and i need a table
for navigation along the left hand side with links in it and i want the text to sit next to this
table to the right the entire length of the page even though the table will end, probably about half
way down. eg: QUOTE ____ ____| text text text ____| text text text ____| text text text ____|
text text text ------text text text ------text text text (the "-"'s are to add spacing as i
cant use multiple spaces. See how the text stays in line and doesn't rever....
Css Image Position Problem
align image left or right (1) I am having problems figuring out why my image will not align how I want it. Here , you can see
that the image is aligned to the left. This is the code for that block: CODE <a
href="http://img355.imageshack.us/img355/844/r25870774779uu.jpg"><img
src="http://img355.imageshack.us/img355/844/r25870774779uu.th.jpg" alt="bush
bathroom break note" align="left" style="margin-right:
5px;"></a>[text goes here] But if you go here , you can see that the
text does not stay to the right of....
Looking for align, text, center, justify, inside
|
|
Searching Video's for align, text, center, justify, inside
|
advertisement
|
|