- This topic is empty.
-
AuthorPosts
-
November 27, 2018 at 5:45 am #279566JamiePattisonParticipant
I have some code which i’ve copied at https://codepen.io/anon/pen/eQLmQL
What im trying to do is have 5 columns across on a desktop, and 1 (maybe 2 at a later date) on a mobile phone. I read some articles and to me it seems the code is correct (the cols add up to 12 but even having them set to 2 each it displays 1 column as you can tell).
Could anyone guide me as im pretty new with CSS/Bootstrap
November 27, 2018 at 6:21 am #279567BeverleyhParticipantbut even having them set to 2 each it displays 1 column
Works as expected when the Bootstrap library is included in the pen settings. Dont forget that you have to link to Bootstrap in order to use it. You can refer to the basic template demo at the official docs link below for guidance.
Could anyone guide me as im pretty new with CSS/Bootstrap
The Bootstrap docs are pretty comprehensive https://getbootstrap.com/docs/3.3/getting-started/ but if you need further help, try Googling “bootstrap start guide” for other tutorials and walkthroughs.
November 27, 2018 at 7:44 am #279569JamiePattisonParticipantI added the bootstrap CDNs which shows the columns as expected, however this disrupts the website style (i downloaded a free template https://html5up.net/future-imperfect should you want to see the site).
Removing the .css reference(s) from the link you provided, then reverts back to the original problem. Anything i can do about this?
November 27, 2018 at 8:34 am #279571BeverleyhParticipantIt looks like you have 2 options;
- Don’t use Bootstrap and modify/code your own in-page layout for the template you have.
OR
- Use Bootstrap and modify the styles of the template so that it behave more like you want.
Option 1 will be easier.
5 columns across on a desktop
You can do this easily with flexbox https://css-tricks.com/snippets/css/a-guide-to-flexbox/
You could also do it with floats (float
property), or inline-blocks or CSS tables (display
property) too. Learn more about layout here http://learnlayout.com/and 1 (maybe 2 at a later date) on a mobile phone.
You can use “media queries” to switch the layout at whatever threshold you choose. Google that term to begin your research.
Good luck with your project.
-
AuthorPosts
- The forum ‘Design’ is closed to new topics and replies.