Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter CaptRobovski

    (@captrobovski)

    Ah I see – that makes sense. Thanks for all your help on this, Anthony; happy to mark this thread as resolved.

    Cheers,

    Rob

    Thread Starter CaptRobovski

    (@captrobovski)

    Thanks for your reply. Yeah, I probably wasn’t being very clear on the clearing issue – I’ve applied the clearfix class to the parent container in the hope that the child items would automatically clear themselves. (The ‘self clearing floats’ code that is in the tutorial I used has CSS that is very similar to the code used in Quark’s clearfix, so I thought it might work in the same way.)

    I had a go with using just margin-right on the portfolio-items and it works as expected, but it does mean that there’s then an uneven margin across the page as a whole i.e. the right page margin is bigger than the left page margin. I just wondered how the homepage widgets manage to have a nice margin in between them and are flush against the left and right sides of the page.

    Thread Starter CaptRobovski

    (@captrobovski)

    Hi Ahortin,

    I’ve had a play and I’ve created a container that uses a percentage for the width and pixels for a min-width (to ensure that the client logo always fits inside the box). Thanks for pointing me in the right direction with the media queries – that’s so cool the way it stacks! : )

    Couple of problems I can’t get my head around:

    1. The portfolio-items are held in a containing element which has a portfolio-sidebar class. The styling for this is exactly the same as the home-sidebar class:

    .portfolio-sidebar {
    	width: 90%;
    	max-width: 1200px;
    	margin: 0 auto;
    	padding-bottom: 32px;
    	padding-bottom: 2rem;
    }

    As I can’t use the grid_3_of_3 class for the portfolio items I’ve had to specify a margin on the portfolio items. This means that the portfolio items are pushed in – they’re not aligned with the main content (H1, paragraphs etc) that are above. Is there a way that I can get the margins to work like the homepage widgets, so that the left portfolio items are flush against the left side?

    2. As with the container that is used to hold the homepage widgets, I’ve added the clearfix class to the container that holds my portfolio widgets. However, as you alluded to in an earlier answer, some of the portfolio-items get stuck underneath each other, rather than beginning a new row. The only way I’ve got round this is to fix the height of the portfolio items. Should the clearfix class allow floated items to sort themselves automatically?

    Thanks again!

    Thread Starter CaptRobovski

    (@captrobovski)

    Thanks for taking a look at this for me. Ah yeah, I was wondering whether the grid would work that way. I’ll switch to a container with a defined width and see how that works.

    I’d still like to mimic the responsive aspect of your grid system, so do you think that I could use a percentage for the width? I appreciate that I’ll have to calculate as a percentage of the main content container (which is using the grid_12_of_12 class). Would I get away with using a percentage as long as I defined a min-width as well?

    Thread Starter CaptRobovski

    (@captrobovski)

    Just been able to take a look at Advanced Custom Fields and was able to get this to work. As I only wanted to change the H1 on standard pages I only needed to change the content-pages.php file and not any of the blog specific ones.

    Thanks again for your help.

    Rob

    Thread Starter CaptRobovski

    (@captrobovski)

    Hi Ahortin,

    Sorry for not being able to reply sooner – I haven’t been able to look at anything to do with the website for the past fortnight.

    I’ve managed to apply the CSS to the widget area, thanks for that. However, as the widgets are using 4 columns (out of the 12 column grid), it’s looking a bit wide as it is, and there’s not a huge gap between the main content area and the side widgets.

    As far as I can work out I could either:

    A. Create new rules specifically for the #secondary .widget class and adding a margin.
    B. Change the side widgets to use 3 columns and add a ‘gutter’ column of 1 column width in between.

    I’ve tested option B by adding a <div> containing a non breaking space in the sidebar.php file and whilst it works, I can’t help but think it’s not very clean! It also means there’s a big gap between the main content and the widgets when viewing on a mobile.

    Could you let me know the best approach?

    Thread Starter CaptRobovski

    (@captrobovski)

    Thanks for replying.

    Cool, thanks for that. Will take a look and let you know how I get on.

    Rob

    Thread Starter CaptRobovski

    (@captrobovski)

    Hi Ahortin,

    Thanks for your reply – I’ll take a look at ACF and hopefully that will do the trick. When I had a go at adding custom fields (the standard WordPress option) last night it wasn’t letting me add any.

    Ah I see! Presumably that allows for a greater level of control per page, which makes sense.

    I’ll have a go and will post back to let you know if this thread is resolved 🙂

Viewing 8 replies - 1 through 8 (of 8 total)