Skip to main content

Questions tagged [slds-grid]

For questions regarding slds-grid from the Lightning Design System

Filter by
Sorted by
Tagged with
6 votes
2 answers
2k views

Is there a difference of using lightning-layout VS <div class="slds-grid">?

There are 2 ways to create flex layout in salesforce lwc: lightning-layout and <div class="slds-grid">. If we use Chrome dev tools, we'll notice that lightning-layout compliles into &...
Eduard's user avatar
  • 5,161
6 votes
2 answers
11k views

How to make SLDS grid columns fill 100% of available height on the screen?

I would like to create a layout similar to this: I have this code: <div class="slds-grid slds-gutters slds-grid_vertical-stretch"> <div class="slds-col slds-size_3-...
Robs's user avatar
  • 9,386
5 votes
2 answers
5k views

slds-gutters not adding spacing between div's

The slds-gutters class does not seem to add spacing between the div's. What is the reason for this? Essentially I could add padding, but I would like to understand why there is no spacing between the ...
ebar's user avatar
  • 447
4 votes
3 answers
11k views

Vertical padding between grid rows in lightning grid

Is there a way to vertically provide some gutter between the rows in a grid? Currently there is a gutter option but only for columns. I am following this article for reference https://www....
Lalit Mehra's user avatar
4 votes
2 answers
2k views

How to hide Lightning Design System Grid item when screen is Small (>= 480px)

I have a Grid which has three columns: <div class="slds-grid slds-wrap"> <div class="slds-col slds-size_1-of-1 slds-large-size_4-of-12"> <span>1</span> </div> &...
Robs's user avatar
  • 9,386
4 votes
1 answer
1k views

Make lightning:layoutItem fill the remaining screen space

I have the following component markup and essentially, I'm trying to make the content in yellow to fill the remaining space on the browser. I tried to do 100% but it did not expand. See screenshot ...
jojopogi's user avatar
  • 510
3 votes
1 answer
10k views

Sizing the layoutitems based on size of the top container and not the viewport

We have built a lightning component which is to be used on the record home page. Now the user can either add the component in the side or in the detail section itself. Everything is working fine ...
Sam's user avatar
  • 4,383
2 votes
3 answers
9k views

Make child rows selected on selecting parent row - lwc tree grid

Is it possible to implement the logic - when parent row is selected all its child rows are selected as well with lightning web component and tree grid? HTML: <lightning-tree-grid key-...
Valentine Potapov's user avatar
2 votes
1 answer
10k views

How to add left and right borders using slds

Image: In this image, The edges are not cutted very properly.I really Look some thing like this. I have tried using "slds-box" still issue is same. How to do like this: Lightning code: <div ...
Annappa PH's user avatar
  • 2,344
2 votes
2 answers
2k views

How to adjust column width in <lightning:tile> <dl class="slds-list_horizontal">?

I tried following the SLDS Utilities patterns for both Name Value Pairs and Description List... In both attempts, the labels' text was truncated, and the tiles had an undesirable excess of white ...
Mobot818's user avatar
  • 142
2 votes
3 answers
7k views

Allign button at the same level of input field

I want to allign create button at the same level of input field i.e exact right side of the input field, in the same line. In the below code, it is coming at below level of the field <div class="...
user2542953's user avatar
2 votes
1 answer
3k views

How to use SLDS responsive sizes when an LWC is in a multi-column page?

The size breakpoints in SLDS are based on the screen size which works great for LWCs that occupy the full width of the screen e.g.: <div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-...
Keith C's user avatar
  • 136k
2 votes
1 answer
2k views

How to use all column width in slds Grid?

I'm using lightning-record-form to build a simple To-Do style checklist. The functionality all works fine however the checklist fields are only using 25% of the column space. Is there a way to fix ...
Jay's user avatar
  • 676
2 votes
1 answer
740 views

How to extend the SLDS Grid with additional x-large and xx-large breakpoints to support huge screens?

I need a grid having 1 columns for phones 2 columns for ipads and 3 columns on 1080p screens. I will also need more distinction for devices between 1000px and 3000px in screen-width. How to do that ...
Uwe Heim's user avatar
  • 28.4k
2 votes
1 answer
540 views

Showing error using SLDS Has Error on Apex:Inputfield with Aria-describedby

I am using the SLDS in visualforce page and trying to display error next to the component by following this. But aria-describedby does not work with <Apex:inputfield> and throws error. Here's ...
anxiousAvocado's user avatar
2 votes
0 answers
519 views

Lightning Datatable does not properly resize when inside grid (flexbox)

Normally the width of a <lightning-datatable> changes dynamically as you change the width of the browser. However, When I put a <lightning-datatable> inside a grid (<div class="...
jbyrd's user avatar
  • 641
2 votes
0 answers
560 views

SLDS Grid Columns Not the Same Width

I'm creating a form and using lightning:layout and giving the lightning:layoutItem a size of 4, which renders <div class="slds-size_4-of-12">. However, I noticed that the last column in the grid ...
Matt Smith's user avatar
1 vote
1 answer
4k views

Lightning Layout - Align Bottom

I'm trying to see if this layout is possible with lightning layout without thinkering about the positioning via CSS. Basically, what I'm trying to do is to line up the content C layout with the green ...
jojopogi's user avatar
  • 510
1 vote
1 answer
2k views

Lightning Layout & Layout Item Question

We have this sort of complex layout item design and my issue is some of the elements keeps going in to the next line. <lightning:layout> <lightning:layoutItem size="12"> ...
jojopogi's user avatar
  • 510
1 vote
1 answer
2k views

Vertical Alignment of Button in Grid Column

In my Lightning Grid one of the columns contains an Input Field and the one next to it contains a button. Ideally I would like the button icon to align vertically with the input field and horizontally ...
Jeff Callahan's user avatar
1 vote
1 answer
2k views

Add blank space in record edit form LWC

I have an LWC Record Page component that has two columns. The two columns have almost the same number of fields with one exception. I need to add a blank space on the second column: <div class=&...
Alex's user avatar
  • 158
1 vote
1 answer
1k views

CSS styling hooks not applying for lightning-badge in LWC

I have the below lightning-badge component where I am trying to change the background color. The background color is not changing. What could be the issue? HTML: <lightning-badge label={product....
Krishnamurthy's user avatar
1 vote
1 answer
2k views

need to display Icon near to field label in LWC for Combobox

I have t create one icon and need to show near to field name for combobox in modal window below is my code <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-...
santu's user avatar
  • 13
1 vote
1 answer
2k views

SLDS Grid evenly spaced with no overflow

I can't seem to achieve what I am looking for. I basically want to have a slds-grid container that will create evenly spaced child <div> containers (slds-col ?) and not shrink or grow depending ...
Bryan Anderson's user avatar
1 vote
1 answer
432 views

LWC - For each Quote, render it as a vertical column in the Grid

I'm trying to create this with LWC selectedQuoteList loads and iterates just fine. I'm just not able to format the grid as you see in the mockup above. Instead, the data is rendered stacked, like ...
Ryan McNeely's user avatar
1 vote
1 answer
1k views

test lwc zoom in and zoom out oprto

whenever user zoom the screen two values gets overlapped with each other. kindly help me out for this. without zooming it looks perfectly fine. kindly help me out for this. below is my HTML code <...
SryukTim's user avatar
1 vote
0 answers
358 views

Align columns vertically in a grid so that it fills empty space

I need to fill empty spaces of columns height wise but it is not filling of its own. Sometimes my one column can be of different height. I have used it like this: <div class="demo-only demo-...
Jill_sfdc's user avatar
  • 453
1 vote
1 answer
2k views

slds-size Not Working Properly For All Elements

I have the following HTMLin a Lightning Web Component: <div class="slds-grid slds-wrap"> <div class="slds-col slds-size_1-of-3 slds-p-bottom_small"> <div style="font-...
Gabriel Rivera's user avatar
1 vote
1 answer
1k views

SLDS Spinner with backdrop on VF Page on Button click [duplicate]

I am trying to add a spinner with a backdrop as the loading screen but the spinner is not working when the action function is invoking. Action function is able to call the apex method but not invoking ...
anxiousAvocado's user avatar
0 votes
1 answer
1k views

I need a grid with 7 equally spaced columns

I'm trying to use lightning-layout and lightning-layout-item to get a row with 7 equally spaced columns (no matter the contents) that fills the full width of the container. slds-grid is useless ...
PatMcClellan__c's user avatar
0 votes
1 answer
11k views

Align lwc made with Grid - Lightning Design System

Can anyone guide me on how to align columns and rows? <template> <lightning-card title="Opening hours"> <!-- Monday --> <div class="slds-grid slds-no-flex"> ...
Tomas Garcia Etchegaray's user avatar
0 votes
2 answers
147 views

LWC Component vertical alignment issue

I am trying to make the button the same height of the input boxes put together. Below is the pic. I tried using the slds-grid_align_center which didnt make any difference at all. Here is my code - &...
sumchans's user avatar
  • 777
0 votes
1 answer
705 views

SLDS Responsive Classes (setting gutter size for different breakpoints) [closed]

Apologies if I missed it in the documentation, but I'm wondering if the Salesforce design system provides any way to change the gutter amount based on breakpoints? Via classes, I see you can change ...
babyYoda's user avatar
0 votes
3 answers
10k views

Trying to create a list dotted list in lwc component

LWC component- <template> <div class="slds-scope"> <p class="slds-text-heading_label slds-m-bottom_small"> Sample </p> <div class="...
SfdcBat's user avatar
  • 4,811
0 votes
1 answer
263 views

alignment issue with lwc

I have a table in which we have 3 mandatory input whenever a value is missing we have a alert message coming below the input but that is causing alignment issue as the input with no error are little ...
prasanth's user avatar
  • 177
0 votes
1 answer
1k views

How to style and align 3 fields in LWC component

<template> <lightning-card title="Update Service Appointment Earliest Start Time" icon-name="utility:date_time" > <span> <div class=...
SfdcBat's user avatar
  • 4,811
0 votes
1 answer
766 views

How can I show more than 3 cards in LWC?

My page looks like this (I can see only 3 cards but there are more) https://i.sstatic.net/wnjw7.jpg How could I change this to show as many cards as possible? Should I use some attribute from SLDS or ...
NonameJavaNoob's user avatar
0 votes
1 answer
760 views

How would you get a child's grid to align to the Parent's grid? (Lightning Design System)

In essence I am trying to achieve LDS Column Nesting but with child components inside of a parent component. I am trying to have the child components, of the parent's, stretch out to the their size_4-...
Tristan Berger's user avatar
0 votes
1 answer
791 views

Grid with Spaces in SLDS

Below is the screenshot of my HTML it looks very ugly(I am not a front end guy) Which SLDS design should i use to make it look good? <template> <div class="slds-theme_default&...
nano's user avatar
  • 15
0 votes
1 answer
8k views

Using slds grid I want to display 3 lightning cards in one row

I have a parent component sending the values for lightning card one by one to the child component. The child component contains the lightning card. I want to display 3 cards in one row but all the ...
sfdcLearner's user avatar
0 votes
1 answer
2k views

Define SLDS small, medium cut-off

I want to have responsive button sizes, and I am using SLDS to accomplish that. Here is my HTML Code: <aura:component controller="CreateTaskLightningController" implements="force:appHostable,...
Peabrain's user avatar
  • 215
0 votes
2 answers
3k views

How to control row height in lightning:layout

I have a lightning:layout with a lightning:layoutItem, containing a lightning:select. I want the row in the layout to be only the height of the select box but I can't figure out how to remove the ...
MikeA's user avatar
  • 1,105
0 votes
1 answer
2k views

Lightning LayoutItem flexibility not working properly

I am using lightning setup assistant in my UI, and I am trying to make it mobile responsive. The button in question here is Add Email Address I am trying to set size attributes accordingly, however ...
mvk1991's user avatar
  • 555
0 votes
1 answer
388 views

How to set up apex:selectRadio in a grid layout

I'm trying to achieve below layout. Below is my code (with 2 approaches) on VF page. <apex:page lightningStylesheets="true" applyHtmlTag="true" > <apex:includeLightning /> <...
Pasan Eeriyagama's user avatar
0 votes
1 answer
5k views

slds grid column alignment problems!

For some time i have been trying to left align the center column, but still keep it at the center. ON the image below you can see the icons with the counts for each service, but not aligned to the ...
sumchans's user avatar
  • 777
0 votes
1 answer
3k views

Salesforce lightning setting slds column rows to be the same height

I'm using lightning:recordEditForm with lightning:inputField to generate a list of fields. I dynamically create a lightning:inputField component and add it to an slds column. The lightning:...
ztrition's user avatar
0 votes
0 answers
14 views

How to setup slds-grid for screens with less than 480px

My slds-grid gets broken when pixels of the screen gets less than 480px, as per salesforce documentation, there is not option available for screens less than 480px to set grid for. But Mobile screens ...
Himanshu Damani's user avatar
0 votes
0 answers
59 views

Show different templates when the browser gets resized for LWC

I am trying to create an LWC that comprises of 5 child bricks inside of a parent layout container. I am using these wrapped in lightning-layout-item and layout respectively. In between each of the ...
thTrailblazerSFPro's user avatar
0 votes
0 answers
45 views

slds-grid question

Would it be possible to create an slds-grid like below?
Alan's user avatar
  • 27
0 votes
1 answer
134 views

why is my slds-grid not fitting to page?

I have a datatable inside of a slds-grid so that I can have multiple tables side by side. When I do this though, the LWC does not fit to the page. Is there a tag I am missing that will enforce strict ...
Olivia's user avatar
  • 3,471