SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Help with sidebar layout
-
Feb 2, 2007, 01:32 #1
- Join Date
- Sep 2006
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Help with sidebar layout
Hello,
I'm in the process of creating a website (you can view it here: www.superhomedecor.com). I've added some news and blog related RSS feeds to the right hand column. The problem is that sometimes the RSS feed contains a long piece of text which widens my right column and messes up the look of the entire site. Is there any way to make the text wrap around to the next line (even if it's one long word) or simply cut off at the edge instead of pushing the table out?
Thanks and be well.
All the best,
Moshe
-
Feb 2, 2007, 02:16 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Not using standard HTML or CSS. User agents are only allowed to break a line at whitespace characters (space, tab, carriage return, line feed). IE and Opera incorrectly break lines at some other characters as well (hyphens, brackets, etc.) but that's incorrect behaviour.
You can either use the overflow CSS property to clip the content or get a scroll bar. Another option is to shorten those long words using server-side scripting (e.g., by replacing everything after N characters with a horizontal ellipsis, '…').
A good start would be to use semantic markup and CSS to handle the layout, rather than the archaic and unsemantic reliance on tables.
You may try CSS properties like table-layout:fixed to 'lock' the 'column' widths, but it is fraught with problems and browser support seems to be a bit iffy.Birnam wood is come to Dunsinane
-
Feb 4, 2007, 06:59 #3
bit dissapointing to hear there's not a reliable CSS workaround for this.
I would have thought the overflow property would have been the one
to kick this into shape.
I guess until it's resolved I would figure placing the feed somewhere
where it has enough room to spill.
-
Feb 5, 2007, 00:57 #4
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's the way tables behave: the way they are expected to behave and the way we wish them to behave.
If you do not want table behaviour (adapting to content), then use more appropriate HTML element types.Birnam wood is come to Dunsinane
Bookmarks