简体   繁体   中英

Twitter Bootstrap: What would be the best way to add a background color to the side margins but not the main content?

I'm trying to make it so that the content in the center remains with a white a background but the side margins are a different color. What would be the best way to accomplish this with TBS?

Add the background color to body {} and put .container as background-color:#fff .

That assumes you're using .container as your main container class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM