style=display:block; width: XXXpx (however many pixels width your phrase is)
a.noShrink {display:block; }
CssClass="noShrink"
display block will make your text rigid instead of fluid, but if your screen gets small, it may hide part of your text "See-a" or it may bring it down on a new line
Give it a try!
or if you want all of your hyperlinks simply add this to your css
a {display:block;} or inline-block
I can't remember if you now need to add float:left as well, but if the first gives you unexpected results, add the float.
"Success is the Sum of Small Efforts, Repeated Day in and Day Out - Without Ceasing!"
Currently Learning: ASP, SQL, CSS, JavaScript, AJAX, XML, XSLT, C# So please be patient with me! Thanks
Jackxxx
Contributor
3060 Points
2788 Posts
How can I keep hyperlink text from separating
Dec 12, 2012 11:32 PM|LINK
How can I keep a hyperlinks text from separating as the browser window gets smaller?
<asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/Sample.aspx" Text="See-A-Sample"></asp:HyperLink>
When the window gets smaller the See-A-Sample changes to, for example:
See-A
-Sample
Jackxxx
Bobby-Z
Contributor
2838 Points
1120 Posts
Re: How can I keep hyperlink text from separating
Dec 12, 2012 11:41 PM|LINK
style=display:block; width: XXXpx (however many pixels width your phrase is)
a.noShrink {display:block; }
CssClass="noShrink"
display block will make your text rigid instead of fluid, but if your screen gets small, it may hide part of your text "See-a" or it may bring it down on a new line
Give it a try!
or if you want all of your hyperlinks simply add this to your css
a {display:block;} or inline-block
I can't remember if you now need to add float:left as well, but if the first gives you unexpected results, add the float.
Currently Learning: ASP, SQL, CSS, JavaScript, AJAX, XML, XSLT, C# So please be patient with me! Thanks
CruzerB
Contributor
5399 Points
1098 Posts
Re: How can I keep hyperlink text from separating
Dec 13, 2012 12:22 AM|LINK
Hi,
Try this. CSS3 word-wrap Property
http://www.w3schools.com/cssref/css3_pr_word-wrap.asp
My Technical Blog
CommDev
Member
112 Points
26 Posts
Re: How can I keep hyperlink text from separating
Dec 17, 2012 10:38 AM|LINK
Hi, try it like this:
a.test
{
word-wrap:break-word;
}
<asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/Sample.aspx" Text="See-A-Sample" CssClass="test"></asp:HyperLink>
karthic_85
Contributor
2598 Points
587 Posts
Re: How can I keep hyperlink text from separating
Dec 17, 2012 10:43 AM|LINK
Try adding "nowrap" to the parent container.