Anyway to keep text in place when adjusting browser window size?
I wrote a web page in html and when the page is not maximized and I make the window really small, the text sort of bunches up. I do have the text centered using CSS if that makes a difference. I want the text to stay in place and have a scroll bar on the bottom so you can scroll and read like other websites. Any suggestions on how to do this? Thanks.
I do not understand the question, e.g. what do you mean by:
- "the text sort of bunches up"?
- "I want the text to stay in place"?
If you resize the window, the text should move to fit the available width. If that is not what is happening, we need to see your code, or at least a link that shows us the problem.
Well..., if you want to set text size as a percentage to the size of the window using CSS:
font-size: 15vw; // relative to the viewport's width
font-size: 15vh; // relative to the viewport's height
font-size: 15vm; // relative to the ratio width/height of the viewport
or If you set an explicit width on the containing object (perhaps a <div> tag) it will not resize with the window. When the window becomes too small, it will not wrap around like you mentioned but force a scroll bar to appear.
Hope this helps.
maybe absolute positioning or position:fixed is what you're looking for
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)