![]() ![]() For this specific case, and on the assumption that there are other pages that require the same attention, I would define a single for a full-width breakpoint. In a nutshell, the key to this method is limiting the number of places where the text is allowed to break.Īfter re-reading the question, I realise I didn't quite satisfy the requirements. The CSS in this example I've produced is just for fun. Some quick experimentation on your own particular set of words should reveal the best words to link.įor the example in this question the HTML could look like: Our New thingamabob is the best thing since sliced bread! However, you cannot use many consecutively, depending on the lengths of the words you're using, linking too many will force the text to overflow out of the viewport or its container. Placing them between the word pairs and triplets that you would like to keep together can produce the results you want. JavaScript, or extra unnecessary elements are not quite "reasonable limits". The formatting of headlines can and should be controlled as much as possible within reasonable limits. I'm only advising this on the basis that it's used for short snippets of text and not paragraphs. What's the best way to control line breaks without hard coding them into the html? But this seems "hacky" to me (it is also very temperamental at times based upon the actual text). Up until now I've used media queries and width percentages for the various h1- h5 tags so that the width of the tag forces a break. ![]() ![]() I really don't want to use break tags ( ) because that hard-sets the breaks at all sizes. Creating two lines.įor a screen with a medium width, I'd break twice:įor even narrower screens, I'd break after "new", after "thingamabob", and after "thing". Our New thingamabob is the best thing sinceĪt full web size, I'd like to break the line after "the". With absolutely no attention to line breaks the line breaks like this: Our New thingamabob is the best thing since sliced bread! I often find I run into issues with headlines and my desired line breaks at different media widths.įor example, I could have a headline such as: I design a great deal of simple single page web items for sales or email. ![]()
0 Comments
Leave a Reply. |