|
| |
|
|
spinningjennie
Posts: 309 Joined: 2/20/2002 From: Status: offline
|
Left float and right float incl time javascript - 10/31/2006 23:13:35
I want to float some text left (with left alignment) on the one 'row' and float some other text right (with right alignment) on the same 'row'. (I'm not using tables here). There might be an even better way of keeping my text on the same 'row', other than floats. And I suppose even floats are not foolproof; they might just give me a better look more often. The text I want to float right is my city, Sydney, plus javascript for the Time/Date in Sydney. When I try to use the right float I can't get the 'Time/Date' javascript to work. For this reason I haven't used floats on these 2 lots of text. Instead I've used a no doubt 'no-no' technique of putting spaces between the text on the left and the text including Time/Date on the right. A problem arises with text wrapping onto the next 'row' when the month is an extra long one, like 'November', or a viewer's screen resolution makes the text larger. Please see this page and the stylesheet Many thanks for any suggestions on this! spinningjennie
|
|
|
|
spinningjennie
Posts: 309 Joined: 2/20/2002 From: Status: offline
|
RE: Left float and right float incl time javascript - 11/1/2006 19:26:29
Thanks a lot Tailslide for alerting me to the use of spans vs divs and the need to assign a width to the floats. I now see that spans allow text to remain on the same line whereas the div forces a new text line. The javascript now appears. I'm not quite there yet however. My right floated text is not aligning to the right as it should. This helps add space between the left and right floated text. Here's the revised page. Here's the revised stylesheet. Background detail: I wanted to add some padding to each end of my row/line of text - left padding on the left floated text and right padding on the right floated text. I see that the padding on the right is not matching the size of the padding on the left even though both lots of padding are 2% and the total of text widths and paddings is 100%. So I know the right floated text is not aligning right. I've tried the same date without the javascript but the right alignment still doesn't work. Thanks for any suggestions. spinningjennie
|
|
|
|
spinningjennie
Posts: 309 Joined: 2/20/2002 From: Status: offline
|
RE: Left float and right float incl time javascript - 11/2/2006 19:21:24
Thanks again Tailslide. Your suggestions have allowed the right alignment to work so that the padding is even on both sides. All is fine in FF. However in IE I now have the problem of the right aligned text shifting down to a lower level than the left aligned text. Regards, spinningjennie
|
|
|
|
spinningjennie
Posts: 309 Joined: 2/20/2002 From: Status: offline
|
RE: Left float and right float incl time javascript - 11/3/2006 6:12:53
Ah, yes. You're right Tailslide about the rounding up. When I removed the two lots of additional 0.5% width on the floats I didn't have the problem in IE 6.0. Another good lesson learned from you. Thankyou! spinningjennie
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|