Jump to content

How can I set up a organically shaped Header?

Recommended Posts

Certainly! To create an organically shaped header, you can use a combination of HTML and CSS, leveraging the `border-radius` property and perhaps some additional styling. Here's a simple example to get you started on vscode:

HTML:
```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="styles.css">
  <title>Your Page Title</title>
</head>
<body>

  <header class="organic-header">
    <!-- Your header content goes here -->
    <h1>Your Website Name</h1>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Services</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </nav>
  </header>

</body>
</html>

Link to comment

Add to Custom CSS

header#header:after {
    content: "";
    background-image: url(https://images.squarespace-cdn.com/content/v1/6475e652b738031c56cb3b98/e990ece7-9fb7-42bb-91dd-791b0cc47ff9/lg_organic_header_graphic_01.png?format=2500w);
    background-size: cover;
    display: block;
    width: 100%;
    height: 150px;
    background-color: transparent;
    position: absolute;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Ah, you are right, it is visible in the preview. However, only part of the image is displayed (see screenshots), even though the browser is set to 100%. The entire graphic is only visible when you zoom out in the browser. How can I change this so that the whole image is always displayed?

Bildschirmfoto 2023-12-19 um 13.26.03.png

Bildschirmfoto 2023-12-19 um 13.22.16.png

Link to comment

Use new code

header#header:after {
    content: "";
    background-image: url(https://images.squarespace-cdn.com/content/v1/6475e652b738031c56cb3b98/0d789b2c-837c-4be0-84af-fa0d24f516b7/lg_header_organic_04.png?format=2500w);
    background-size: contain;
    display: block;
    width: 100%;
    height: 100px;
    background-color: transparent;
    position: absolute;
    background-repeat: repeat-x;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.