- This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
Viewing 12 posts - 1 through 12 (of 12 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi.
I’m having problems justifying h1 text in a 940px div for a site I’m working on.
The Best Studio
Awesome Artists
Black Bird Tattoo
I applied text-align justify but it had no effect. I want all three lines completely justified. Would appreciate any advice here.
Thanks.
:)
So you actually have three separate lines of text inside an H1?
What are you expecting ‘justify’ to do…it can’t stretch text after all?
I’m trying to layout the text like http://simpleasmilk.co.uk/. I have tried playing around with the markup & CSS but still can’t get it to do what I want. Do you have any suggestions?
If you look at their markup they put each letter in a span…very heavy codewise.
My advice would be to put three separate headings inside an ‘hgroup’. Give each of the headings a class and style them all independently.
They’re using lettering.js which puts each character into a span. This is your best option.
This should do what you are after: http://www.zachleat.com/bigtext/demo/
It’s very similar to lettering.js, but won’t require you to manually adjust each glyph.
Thanks for the responses … Much appreciated. Is there no way to do this using CSS alone and avoiding JS?
I’m not sure if you looked at the link I posted, but the output code is just CSS.
Hi Josh, I can’t get it to work, I don’t even see what the problem could be? I have set the width to 620px in Big Text, copied the source, pasted and nothing … :(
Thanks J,
Without playing around with letter spacing etc … And just focusing on 1 line of text. Is there a method which will ‘span/stretch/justify’ a headline to a specific width. So I want 1 headline to span 620px for instance?
If that’s the case, you are best using a jQuery plugin like http://fittextjs.com/ and applying it to each line.
@joshuanhibbert that BigText Wizard thing is pretty cool. If you don’t have dynamic text, it’s perfect!