r/csshelp • • Sep 14 '20

Request Site Title and Navigation Bar Alignment Help

Hi,

I'm not a web developer in the slightest and I need some help with alignment. I'd like my site title "Niki Phillips Photography" to be truly aligned all the way to the left, like the picture of a man on a mountain a bit below it.

Similarly, I'd like the nav bar aligned truly to the right. The spacing between nav links is fine, I'd just like it on the right side of the page.

link to website is below:

www.nikiphillips.com

any help is truly appreciated! I'm sure it's something quick and easy but it is driving me crazy!

6 Upvotes

5 comments sorted by

1

u/FriesWithThat Sep 15 '20

Your header has a header-inner class that is a constrained container, currently set to max-width: 1180px. So they are as left and right aligned as possible within that space. What you see in the middle of the DevTool panel in the attached screen shot is I simply turned-off the declaration for the max-width in the .header-inner rule (it appears unchecked and struck-thru). What you'd want to do in the css is to change this property to

.header-inner {
  max-width: none;
}

Leave the margin-left and margin-right properties alone as they are overriding some other display: flex properties to keep the site centered.

1

u/jerseykin Sep 15 '20

Thank you so much! I pulled up the custom CSS that’s in my site already and there’s no code for header inner. Possibly something that comes natively with the squarespace template? Is there any code I can lay on top of this to change it as I’m not sure how to change what’s existing already?

1

u/FriesWithThat Sep 15 '20

It looks like that without a premium account on squarespace you're not allowed access to any "advanced" developer tools to get access to that element. One idea, based on your code and other examples of what would be one of their "full width" templates that bleeds is that there's space for a center block of content in the header between the page title and nav - you are not using this space for anything so that could force a collapse. pic

<div data-nc-container="top-left">
  <!-- YOUR SITE TITLE IS HERE -->
</div>

<div data-nc-container="top-center">
   <!---THERE's NOTHING HERE -->
</div>

<div data-nc-container="top-right">
  <!--YOUR NAV CONTENT IS HERE -->
</div>

This should be within the range of what you can access within the site template. There's hacky stuff you can do such as insert an image (white), or text, that would match the background and spread-out the title and nav to the left and right respectively, but I suspect that having any content there (especially if you apply a width to it) will cause the left and right to spread as they're supposed to here.

Good luck :)

2

u/jerseykin Sep 15 '20

Thank you so much for your help. I truly appreciate it

1

u/Krossfireo Sep 15 '20

Your .Header-inner class has a padding-right of 27.5px, remove that and that will be against the left edge. The padding-right is also 27.5 on that class, so if you remove that, I think it gives you the effect you want.