hyperlink wrapping (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


yogaboy -> hyperlink wrapping (9/14/2005 12:21:01)

Anyone know a quick way to make sure hyperlinks wrap when they hit the edges of the containing element?

I have a page with a div set to 36% width, the div contains several fieldsets which contain paragraphs with links. On FF the links continue over the edge of the fieldset and div. On the other hand, IE resizes the fieldset to be wide enough to contain the link.




c1sissy -> RE: hyperlink wrapping (9/14/2005 12:34:06)

I believe you use:

whitespace: nowrap;

in your styles




yogaboy -> RE: hyperlink wrapping (9/14/2005 13:03:56)

I tried it but it hasn't worked. This is one of the links below

http://www.dh.gov.uk/PolicyAndGuidance/HealthAndSocialCareTopics/ChildrenServices/ChildrenServicesInformation/fs/en

I don't know who worked out that file structure, but give the boy a prize![:)]




Tailslide -> RE: hyperlink wrapping (9/14/2005 13:14:41)

Iain - to my knowledge you can't force this with CSS.

Your choices would look like either removing a width from the fieldset.
Getting rid of the fieldset and maybe using a list instead?
Using PHP to shorten the URLs or add ellipsis at the end of the line.

You can give the links within the fieldset a class that floats them or make them block level so they go to the next line but that's not much use if they're longer than a single line.

Edit: Iain - where exactly is this causing a problem? Do you have to have the actual URL visible - because if you can just have the link text then you're fine - it's only when you've got no spaces that you get a problem (like with the url itself).




yogaboy -> RE: hyperlink wrapping (9/14/2005 13:25:09)

Ok, thanks for the help, I will try to find a way to shorten the links!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875