Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 117707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:22:44+00:00 2026-05-11T03:22:44+00:00

I have a block of preformatted code (<pre>) which overflows horizontally so there is

  • 0

I have a block of preformatted code (<pre>) which overflows horizontally so there is an horizontal scrollbar to allow the user to view the content.

overflow: auto; 

However, in IE7 (maybe other IE versions), the scrollbar overlaps the last line of my content (which is especially irritating when there is just one line of content).

I’ve tried the solution listed here, but it didn’t work.

The only solution that works is to use

overflow: scroll; 

which adds a scrollbar to all my preformatted sections which is just awful.

Note: It works fine in Firefox 3 and Google Chrome.


Update

I’ve found a solution (see my answer), but if someone finds a way to not have the ugly padding in every preformatted section in IE7, that would be perfect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:22:45+00:00Added an answer on May 11, 2026 at 3:22 am

    Just after posting the question I thought about checking if stackoverflow handled that (which it does).

    I took a look at the stylesheet and found this:

    padding-bottom: 19px!ie7; 

    (well, they use 20px, but 19 looked better).

    It adds a bottom padding only for IE7, which makes every preformatted sections without a scrollbar look a little weird because of the huge padding, but at least I can see the content (and it does look weird on stackoverflow too).

    Sorry for asking a question too quickly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 75k
  • Answers 75k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Use String#scan: >> 'abcdefghijklmnopqrstuvwxyz'.scan(/.{4}/) => ['abcd', 'efgh', 'ijkl', 'mnop', 'qrst',… May 11, 2026 at 2:40 pm
  • added an answer Rack is a very lightweight specification that Ruby web servers… May 11, 2026 at 2:40 pm
  • added an answer AFAIK you can use dev editions for QA as long… May 11, 2026 at 2:40 pm

Related Questions

When presenting preformatted text on the web (e.g. code samples), line wrapping can be
I have a block of product images we received from a customer. Each product
I have a block of code that works and I wanted to ask what
I have a block of JSP code that needs to be used in several

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.