/    Sign up×
Community /Pin to ProfileBookmark

CSS Text Placement Question

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

[url]http://www.gamexplain.com/test.shtml[/url]

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:

[url]http://www.gamexplain.com/test2.shtml[/url]

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.

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@NeczyDec 10.2004 — [font=trebuchet ms]Have you tried adding padding/margins to it?[/font]
Copy linkTweet thisAlerts:
@duderdude2authorDec 10.2004 — [i]Originally posted by Neczy [/i]

[B][font=trebuchet ms]Have you tried adding padding/margins to it?[/font] [/B][/QUOTE]


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?
Copy linkTweet thisAlerts:
@NeczyDec 10.2004 — [font=trebuchet ms]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?[/font]
Copy linkTweet thisAlerts:
@duderdude2authorDec 10.2004 — [i]Originally posted by Neczy [/i]

[B][font=trebuchet ms]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?[/font] [/B][/QUOTE]


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 ?
Copy linkTweet thisAlerts:
@NogDogDec 10.2004 — One option would be to set [b][FONT=courier new]overflow: scroll;[/FONT][/b] so that the scrollbar is always displayed, then make your layout work with that. Esthetically, probably not optimal. ?
Copy linkTweet thisAlerts:
@duderdude2authorDec 10.2004 — [i]Originally posted by NogDog [/i]

[B]One option would be to set [b][FONT=courier new]overflow: scroll;[/FONT][/b] so that the scrollbar is always displayed, then make your layout work with that. Esthetically, probably not optimal. ? [/B][/QUOTE]


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.
×

Success!

Help @duderdude2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...