Skip to content
WJunction - Webmaster Forum

Max width on code-box

Status
Not open for further replies.
Hi,

Im using phpBB2 on one of my domains and I wanted to apply some CSS that the code-boxes have a horizontal scroll-bar after it's over 500px in width lets say. In firefox it breaks the line but in IE it doens't.

I currently have this in my CSS:
Code:
/* Quote & Code blocks */
.code {
    font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
    background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
    border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

Here is how it looks in firefox:



here is how it looks in IE:


Help would be appreciated ;)
 

1 comment

I think the best 'universal' luck you could get with what you want would be to switch the
Code:
 tags so that they are actually part of a DIV. Then apply your attributes.
No matter what browsers you use, div's seem to have the best luck for me.
 
Status
Not open for further replies.

About the author

W
The Wise One · Joined
Jolien <3
2,480
Messages
282
Reactions
83
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom