Page 1 of 1

Re: Aligning Text on a Website?

Posted: 26 Jul 2015, 09:28
by Stitch Up
I know very little about HTML so wonder if anyone can help me with a niggle?

On my website, I'd like to improve the appearance of some text so it's better presented to the potential customer.

This what it look like now - a bit messy:
Image

This is the code - sorry, don't know how to post HTML code on the forum and avoid it not changing from the text:

[LEFT]
Tapered fit with a light feel and sturdy build.
Tubular construction with shoulder-to-shoulder tape. Twin needle sleeve and bottom hem. Seamed collarette.



Fabric100% Pure Cotton



Weight:150 g/m²



Size

S&nbsp&nbsp&nbsp&nbsp -&nbsp&nbsp&nbsp10

M&nbsp&nbsp&nbsp -&nbsp&nbsp&nbsp12

L&nbsp&nbsp&nbsp&nbsp -&nbsp&nbsp&nbsp14

XL&nbsp&nbsp -&nbsp&nbsp&nbsp16

2XL -&nbsp&nbsp18

[/LEFT]


I know there must be a better way :biggrin: :confused:

Any help appreciated.

John

Re: Aligning Text on a Website?

Posted: 26 Jul 2015, 10:34
by FutureProject
I would probably...

add the : and a couple of nbsp after fabric and match weight

a table would work for the size data, (don't worry you don't need ugly lines) so you would have 3 columns

Re: Aligning Text on a Website?

Posted: 26 Jul 2015, 10:36
by Stitch Up
I did think of using a table format - I feel another learning curve coming on :)

Thanks

Re: Aligning Text on a Website?

Posted: 26 Jul 2015, 10:39
by FutureProject
pretty simple the first example is very close to what you need:

http://www.w3schools.com/html/html_tables.asp

Re: Aligning Text on a Website?

Posted: 01 Dec 2015, 22:02
by Rgcouk
Hello, tables would work but i hate tables, you could do that using a list and span i should imagine.

Code view not working well, i've pastebinned it. http://pastebin.com/s0ERdD58
This isn't working code, i just typed it in here but it wont be far wrong, if you was able to provide a link when you've added the html and that bit of css i can fix it up for you without a problem.

Re: Aligning Text on a Website?

Posted: 01 Dec 2015, 22:23
by wayupnorth
No reason to hate tables, perfect for this application and could be achieved in a few minutes.

Re: Aligning Text on a Website?

Posted: 01 Dec 2015, 22:28
by FutureProject
it is tabulated data so there's no reason not to use a table, it's the exact reason the element exists.

people hate them because they have been abused and used for design and now try to avoid them like the plague even for tabulated data which is just as bad as miss using them.

Re: Aligning Text on a Website?

Posted: 01 Dec 2015, 22:33
by Rgcouk
Tables are good for displaying data but in modern web i don't they work, especially with mobile devices.



s
10


m
12


l
14


xl
16


xxl
18


Using a list how i suggested shortens the code its cleaner, would very easily be made responsive so i would look great in any device, the times we live in potential customers are hitting your site with a vast range of devices.