CSS Text Placement Question

liunx

Guest
I'm placing text using CSS with an overflow command. You can see what I've done here:

<!-- m --><a class="postlink" href="http://www.gamexplain.com/test.shtml">http://www.gamexplain.com/test.shtml</a><!-- m -->

Is there a way so I can have the text not bump up against the designated area (because when the text bumps up against the box it's inside, it just doesn't look good)? I know I could reduce the designated text area, but problem is, when the text goes into "overflow" mode, the scroll bar that appears won't be be flush with the box its inside, as seen here:

<!-- m --><a class="postlink" href="http://www.gamexplain.com/test2.shtml">http://www.gamexplain.com/test2.shtml</a><!-- m -->

If my question made sense, is there anything I can do?

Edit: You might have to change your text size in your browser to make the scroll bar appear and disappear.Have you tried adding padding/margins to it?Originally posted by Neczy
Have you tried adding padding/margins to it?

That's just crazy enough to work. Do the commands for that differ from what I would use in a table? (Sorry, I'm still new to CSS).

Oh, and that won't affect the scroll bar either, just the text, right?Ah, good point. I just tested and it does. Is there any reason why you want to use the overflow property, and get a scrollbar?Originally posted by Neczy
Ah, good point. I just tested and it does. Is there any reason why you want to use the overflow property, and get a scrollbar?

Well, ideally, the text amount would never exceed the box I've placed it in (the box's size isn't final yet, though if someone is using a larger text size, then the scroll bar will almost certainly appear). On the final page there will be at least two rows of four boxes, consisting of the sized box you just saw. I can't have the size of the box adjusting to accomadate the text because that would throw my layout off (as would be in a table). I also want to fit as many of the boxes on screen as I can.

I hope this made sense :)One option would be to set overflow: scroll; so that the scrollbar is always displayed, then make your layout work with that. Esthetically, probably not optimal. :(Originally posted by NogDog
One option would be to set overflow: scroll; so that the scrollbar is always displayed, then make your layout work with that. Esthetically, probably not optimal. :(

Thanks, but I think I'd rather have the text butting up against the right edge.

Well, I guess there's nothing for me to do but buck up and accept it as is. Thanks anyway.
 
Back
Top