Avatar of QGolden
QGolden
 asked on

Drupal css header

We are thinking about switching our website over to Drupal. I have found a theme that I would like to use but the original header image is to small, so I have uplpaded the image from our current site but the way the css is set up the display and menu bars don't display correctly.

I'm guessing it has some thing to do with the css. I don't really know that much about css as I'm still learning. Is there a way to easily fix the header problem??

http://qgprocurement.com/drupal/

I would like the image along the top of the page with the black menu bar under it. I used to using tables and HTML
CSSDrupal

Avatar of undefined
Last Comment
QGolden

8/22/2022 - Mon
Thomas4019

CSS is the future and isn't going away, so dedicating some time to studying it will go very far.

First check the theme's settings to see if there is an option there.

Easiest solution, open up paint/photoshop/gimp and change/resize your logo.

The CSS rules are a little tricky to change the header's height. Open up each of themes css files and look for documentation.
web2developer

Size of your current logo image is 844px × 216px. So as per  dimension of your logo replace css code of your Pixture_reloaded theme's layout.css with following attached code (Code SnippetSnippet ID=1040747)-



#header {
  margin: 0 0 15px 0;
  padding: 0;
  height: 256px;
}
#logo {
  margin: 0 10px 0 0;
  padding: 0;
  height: 244px;
  float: left;
  overflow: hidden;
}
#head-elements {
position:absolute;
left:100px;
top:20px;
z-index:1;
}

Open in new window

QGolden

ASKER
web2developer:
The above code displays the full image but it messes up the rest of the page. The black header menu bar is hidden behind the image, the menu options seem to be in the right place but can't really see them, the page contents is shifted to the right of the page.

Thomas4019
I was hoping to use the same image as our current site but doesn't look likes that possible. I am planning to learn css very soon. css and Drupal seems very complex as it uses more than 1 style sheet, do most site use multipliable sheets ??
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Thomas4019

I am sure it's possible to do what you want if you know enough CSS. Modifying an existing theme can be very complicated, as you said. Some Drupal themes use just 1-3 stylesheets while others go overboard with way to many around 10-20. It's normal for a site to have 1-5 CSS sheets. Drupal has an item to combine CSS stylesheets before sending them to the client, called "CSS Aggregation". This is a must for performance.

Tools like firebug help when working with complicated themes. GetFirebug.com
Thomas4019

If you're new to Drupal picking an good easy starting theme is essential. Maybe look for a theme that is more accommodating with large banners.

Really, I think you could just shrink you banner by 150% and then it would fit well.
QGolden

ASKER
Thanks. I have checked out other themes and on some you can set the logo size so that it fits but I'm finding it hard to center the image, it's either left or right no middle.

I'm having a hard time getting my head around css and Drupal but I'll keep at it.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Thomas4019

Centering things should be easy with CSS.

Just keep studying, it will make perfect sense soon enough.
#id-of-header-element {
   text-align:center;
}

Open in new window

web2developer

@QGolden: try to alter my code with this
#header {
  margin: 0 0 15px 0;
  padding: 0;
  height: 256px;
}
#logo {
  margin: 0 10px 0 0;
  padding: 0;
  height: 244px;
  float: left;
  overflow: hidden;
}
#head-elements {
position:absolute;
left:100px;
top:244px;
z-index:1;
}

Open in new window

ASKER CERTIFIED SOLUTION
QGolden

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
QGolden

ASKER
Used a different theme
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck