- This topic has 13 replies, 2 voices, and was last updated 5 years, 7 months ago by
Sebastian.
Author | Posts |
---|---|
Martin_1
August 8, 2019 at 9:11 pm
|
Hi, I a realy sruggling with three things. Issue 1: I am tryng to get a full width background color behind the “Related Products” section on the product pages of this site (just above the footer): https://www.wintherbikes.com/product-items/kangaroo-luxe/ I have tried this:
which does create a grey background color behind the related products but messes up the images that show there at smaller screens (moves them and even overlaps them) and at even smaller than those screens removes the grey background all together. Issue 2: I created a responsive table with “Technical Data” on a green/blue background on the product pages but on lower screensize the second row of the right table doesn’t align neatly with the first. Here is the css I used: /* Making tables responsive and the text in the first row bold. */ /** Content >> Table left padding product detail **/ /** Content >> Table right padding product detail **/ /* remove the border around the table product detail page*/ tbody tr td:nth-of-type(1) { /** Content >> Table background color product detail **/ Issue 3: The four columns in the footer won’t align neatly in the center on smaller screensizes at least when I test it on my phone (Huawei Mate 20) horizontal en vertical viewport. I currently have this CSS: /*( Tablet & Phone )*/ I tried setting the margin to auto but that had no effect. Can anyone help me with these three issues? I have been struggling for about a week now :-(. |
Sebastian
August 9, 2019 at 1:42 pm
|
Hi Martin, unfortunately I’m away today and over the weekend. But I can help on Monday if the issues are still outstanding. One thing I can say from a quick skim is that with issue 2 you could vertical-align: top; the table cells. Cheers, |
Martin_1
August 9, 2019 at 3:06 pm
|
Hi Sebastian, Monday is fine. I have been struggling with it for a week, a few more days won’t kill me :-). Who knows, maybe I’ll finally be able t solve it in the mean time :-D. I tried your solution, but it didn’t seem to solve it. Maybe I’m misunderstanding you? I targeted the cells and all it did was align to the top the content of all cells. This didn’t do anything for the misalignement between the second table rows of both tables on smaller screens. Greetings, Martin |
Sebastian
August 12, 2019 at 10:28 am
|
Hey Martin, Issue 1: Issue 2:
Issue3: Cheers, |
Martin_1
August 12, 2019 at 12:18 pm
|
Hi Sebastian, I hope you had a great weekend! Issue 1: Issue 2: .test { However, that kills my responsiveness and only seems to work in Chrome. THe original tables above that single table are responsive. Issue 3: |
Martin_1
August 12, 2019 at 12:33 pm
|
In regards to issue 2 I have now duplicated to this page the same table. As you can see, due to me messing around with the css both tables (although they contain exact the same information) are different. The one on the right is less tall. So maybe that’s where the issue with the alignment comes from? |
Sebastian
August 12, 2019 at 4:14 pm
|
With issue 1, could you put the CSS back even though it messed up the images? If CSS is your only option, you will need to make the row full width and then deal with how this affects the images. Wish issue 2, why can’t you create a table with 4 columns? The variable length of the text will always cause data in separate tables to misalign. Cheers, |
Martin_1
August 12, 2019 at 5:04 pm
|
Hey Sebastian, Issue 1: This is the css
Issue 2: |
Sebastian
August 13, 2019 at 9:10 am
|
Issue 1: Issue 2: Cheers, |
Martin_1
August 13, 2019 at 6:00 pm
|
Hi Sebastian, I am very limited into what I can do with the related projects/posts I am not sure if any of these settings are of any help. I never believed this would this difficult to achieve. It looks relatively easy. Adding a background color to something like this :-(. I tried it now with this: .single-related-posts { but that doesn’t align the related items correctly. (they are supposed to start where the blue/green techinical data block starts). It aligns it all the way to the left (even overflowing a bit as you can see from the text “Related Porducts” where the R falls away a bit). It also works good on smaller screens. So that is a plus. |
Martin_1
August 16, 2019 at 10:16 am
|
Oops, it looks like I had it commented it out LOL. No wonder it wouldn’t show. Now it’s visible again. But now the question is: how do I get it to align where it should align? |
Sebastian
August 16, 2019 at 11:08 am
|
Ah, thanks for sorting that. To align the child elements, you could try the following CSS:
Cheers, |
Martin_1
August 16, 2019 at 11:34 am
|
YES, This is as close as we can get it :-). For now I am happy with the result. Who knew that it would be THAT difficult :-). But I am not one to give up easily and I am glad you stuck with me Sebastian! You rock mate \m/ |
Sebastian
August 16, 2019 at 12:27 pm
|
Great, I’m glad we got there too! Well done for persisting, that’s the way to learn 🙂 |