Looking for an easy way in CSS to finish the "cross" design?

https://i.sstatic.net/nBl4Q.pngI'm looking to design a unique box/div for this message board that incorporates the top part of a cross into the layout. My vision is to have a small image on the left side of the bar, with the banner/logo taking up the space on the right side.

I'm struggling to figure out how to create two div elements where the left side has a fixed width and the right side automatically adjusts to fill the remaining browser space. Check out my test-site here:

#wrapper {
  position: relative;
  width: 95%;
  margin: 0 auto;
  border: 2px solid #FF0000;
}

#header {
  text-align: center;
  height: 175px;
  background: #FFFF80;
}

#content,
#footer {
  margin-left: 175px;
  border: 1px solid #0000FF;
  border-left: 50px solid #0000FF;
}

#content:after {
  content: '';
  position: absolute;
  width: 400px;
  left: 0;
  top: 125px;
  border-top: 50px solid #0000FF;
}
<div id="wrapper">

  <div id="header">
    board banner/logo goes here
    <h1>Your board name here</h1>
  </div>
  <!-- end header -->

  <div id="content">
  </div>
</div>

Answer №1

If you utilize 'css flex', it could potentially address your query effectively. There is a helpful website available for learning more about CSS Flex

The code snippet below serves as an illustration of what you might want to accomplish, hopefully resolving your inquiry.

index.html

<div id="header" class="flex_container">
  <div class="flex_left">
    <img alt="picture" src="">
  </div>
  <div class="flex_right">
    Place board banner/logo here
    <h1>Specify your board name</h1>
  </div>
</div>

main.css

.flex_container {
  display: flex;
}

.flex_left{
  min-width: 175px;
  padding-bottom: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 50px solid #0000FF;
}

.flex_right{
  width: 100%;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for utilizing ajax and jquery to transmit an array/List. The resource loading issue may arise due to server responding with a status of 415

I am a beginner when it comes to using Jquery Ajax, and I am attempting to send an array via post in the following manner. $(function(){ $("#btnSave").click(function(){ var dataToSend = new Array(); $("# ...

Once the div content is reloaded using AJAX, the refreshed HTML suddenly vanishes

My JS code reloads the div every 2 seconds: var auto_refresh = setInterval(function() { $('#indexRefresh').load('/includes/index_refresh_include.php?_=' + Math.random()); }, 2000); After that, I have an AJAX request that loads mor ...

Blend 2 text layers in HTML/CSS

I'm trying to create an effect where two titles overlap each other, with the white title appearing as a border around the black title. However, I'm having trouble figuring out how to achieve this. The light grey box represents the enclosing div. ...

Issue with Cascading Dropdowns in jQuery

I am currently experiencing issues with a piece of code on my website (also accessible via this link). The code consists of 2 select fields that should display different data based on the selection made. However, I have identified 2 bugs within the code. ...

Place text within SVG in alignment

There seems to be an issue with aligning text in Adobe Illustrator when exporting graphics to SVG. When the text is initially exported, it is aligned to the center, but if you change the text using JavaScript from "Default text" to "New text", the alignmen ...

Utilizing Angular 9's inherent Ng directives to validate input components within child elements

In my current setup, I have a text control input component that serves as the input field for my form. This component is reused for various types of input data such as Name, Email, Password, etc. The component has been configured to accept properties like ...

Selenium: Element not found using class and id selectors

When attempting to scrape a website, I wrote a loop that successfully located all the elements. However, my issue is that the next button id changes with each page, making it impossible to use the id as a reliable locator. For example, on page 1, this is ...

Utilizing JavaScript to arrange the dots around the circle proves to be glitchy

I am having trouble positioning dots around a circle. The top and bottom points are not aligning properly, resulting in a buggy display. What could be causing this issue? How can I fix this problem? $(function(){ var globe = $('#center') ...

How can I stop my child page from taking on the link color (red) of the parent theme?

My child page should have white colored links instead of inheriting the red link color from the parent theme. What changes do I need to make in the HTML/CSS to achieve this? Parent Page CSS a { text-decoration: none; color: red; } a:hover { colo ...

Utilize ng-repeat to display a series of images, with the first image being placed within a unique div

My challenge lies in displaying product images using ng-repeat, where one image is located in a separate div. Let me share my code and explain what is happening. The API response provides product details and images [{"id_product":"1000","name":"Nikolaus ...

What is the easiest way to import a CSS file into just one specific page in Ionic2?

Take, for instance, my desire to import the following: <link rel="stylesheet" href="mycss.css"> into example_page. I attempted importing it from index.html, but I fear that by doing so, the CSS will be loaded on every page each time I run my app. I ...

How can I make a dropdown menu appear when I select a checkbox?

Is it possible to have a dropdown menu with changing options appear when I click on a checkbox using HTML and JavaScript? I have experimented with some code snippets in JavaScript as a beginner, but I am unsure if they are needed here. Is there an altern ...

``Why isn't the Bootstrap dropdown menu button displaying properly on a Leaflet map?

I am currently in the process of developing a LeafletJS Map integrated with Bootstrap buttons. I have successfully configured the map to be fullscreen and positioned the buttons on top of it. Below is the code snippet that I utilized for this setup: <! ...

The presence of element hr within element ul is not permitted in this particular context. Additional errors from this subtree will not be displayed

Here is the code snippet that I have been working on recently: Originally, I had an "hr" tag directly included in my code which worked perfectly but caused a site validation error. So, I made some changes to the code as shown below: <nav> ...

What is causing the turn.js demo to not function properly?

I tested the demo script on fiddle as recommended in the official docs. Upon downloading the script and trying to run it in my browser, I encountered a problem where it did not work, and no errors were displayed on the console. Curiously, when I ran the ...

Unable to sort the list items when utilizing the load() function

I have multiple li elements within a ul and I am using the following code to sort them in ascending order based on the data-percentage attribute: $(function() { $(".alll li").sort(sort_li).appendTo('.alll'); function sort_li(a, b) { re ...

What could be causing this PHP code to fail? I keep getting an error message about an undefined

I am currently facing an issue while trying to upload an image to the server. Within a form that consists of multiple inputs, I have embedded an Iframe containing another form specifically for the uploading process. This setup ensures that the original fo ...

What factors determine the height of a table cell?

My forehead is now a grid of indents after battling with HTML tables for days, leaving marks resembling my keyboard. Speaking of grids, I'm curious if there are any clear guidelines on the sizing of <td>. Does it depend solely on content? Is i ...

Ensure that the CSS data-step attribute is replaced with the use of a span element

Hi there, I'm currently working with a step bar template that you can find at the following link: http://codepen.io/mattdrose/pen/qEZBge My issue arises when dealing with the complete step, which is represented by the following code: <li class="i ...

Trouble with webpage design persists following recent modifications

Today, I decided to make some alterations on the header.php file of my WordPress website in order to tweak the flag icons displayed at the top of the page. However, when I refreshed the page, everything looked completely chaotic. Even after undoing all th ...