nov8 Posted February 11, 2015 Share Posted February 11, 2015 I am using the supply template and the text blocks auto-scale with the width of the browser. Is it possible for spacer blocks and image blocks to adjust for the browser scaling (remain full width) and the text block to remain a consistent or max width? http://www.dillonjamesrobertson.com/ Link to comment
benjamin1570047927 Posted February 11, 2015 Share Posted February 11, 2015 It is possible, at the moment your text box is set to be 50% width (6 column of a 12 column grid) until it detects a mobile screen. If you didn't wish to scale you would just set a fixed width value to it, ie. 500pxor you would use media queries to change the width at specific browser sizes. edit: adding code up here .sqs-block-content p {max-width:300px;} @media only screen and (max-width:640px) { .sqs-block-content p {max-width:100%!important;} } change the values to whatever you need Link to comment
nov8 Posted February 11, 2015 Author Share Posted February 11, 2015 How would I set a fixed width value? Do I need to inject code? I'm sorry if this is dumb question; I am not sure if I am missing something, but with Squarespace 7 the only way I can find to adjust a block's width is when you place another block beside it and use the handle to scale them. Thank you for the quick response! Link to comment
benjamin1570047927 Posted February 11, 2015 Share Posted February 11, 2015 Yeah a little bit of code, use the custom css option under design to do this. What would like the text box to do? I can help Link to comment
nov8 Posted February 11, 2015 Author Share Posted February 11, 2015 I would just like to assign it a fixed width of probably 300 pixels. I am also looking to control this with future text blocks on the site how are you targeting the div( or squarespace equivalent)? Thanks again Link to comment
benjamin1570047927 Posted February 11, 2015 Share Posted February 11, 2015 This styling will be site-wide, if you use Custom CSS, or page specific if posted into your page > advanced > header injection area first bit is the text box, second is a media query that makes it 100% wide on mobiles. Posted into the answer, if you're using chrome, you can find out which element has what name, by right clicking on something and hitting 'inspect element' Link to comment
nov8 Posted February 11, 2015 Author Share Posted February 11, 2015 Thank you! The code worked for the site wide approach! But, for some reason it failed when I put it in the page specific header injection area? Link to comment
benjamin1570047927 Posted February 11, 2015 Share Posted February 11, 2015 I should've added that, when posting css into the header you need to wrap it inside a < style > code here < / style > like this without the spaces Link to comment
nov8 Posted February 11, 2015 Author Share Posted February 11, 2015 Thank you so much you are awesome! Link to comment
benjamin1570047927 Posted February 11, 2015 Share Posted February 11, 2015 No problem, you'll figure it out :D Link to comment
CraigB Posted October 27, 2015 Share Posted October 27, 2015 This might work on some templates for fixing the width and centring the text Block. .html-block { width: 960px; margin:auto } Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.