Jump to content

Recommended Posts

Good evening all,

i wonder if you can help me?

i have been playing around trying to move my header menu (directly under the logo, i'll post the link in a minute).

I can get the menu to move but when i do, it goes completely out of context (goes vertically and various colours instead of running horizontally like it is now!) I have obviously kept a copy of the original code whilst i play about with it and have put it back to the original state.

 

I have pasted the code at this link: https://paste.ofcode.org/NtQgR7FRaQ74nVdrFVy5uz


 

Any suggestions would be greatly appreciated.

 

Thanks in advance.

 

Adrian

Link to comment
https://forums.phpfreaks.com/topic/307200-moving-the-header-menu-next-to-the-logo/
Share on other sites

Yes, sorry i should have mentioned that. :)

Thank you for the quick reply.

 

Whilst trying to move stuff, i did manage to get the request a quote button alongside the phone number, but it was on the wrong side :/, it ended up on the right hand side instead of the left! LOL

You want it on the left? Seems a bit weird. Shouldn't it be by the phone number since they're both about contacting the company?

 

Anyway, that whole header kinda needs a redo. I mean, why are the menu items marked as .color-N? Why are there so many overlapping elements? Using ULs for presentation?

 

Start with logical, semantic markup. Here's what I would try first:

<header>
	<a class="logo" href="...">
		<img src="...">
	</a>
	<nav>
		<ul>
			...
		</ul>
	</nav>
	<a class="request-quote" href="...">...</a>
	<div class="phone">
		<p>Call Us Today</p>
		<a href="...">...</a>
	</div>
</header>
Using whatever CSS tooling is available, you'd

- Have the header use a flexible layout so the menu can stretch.

- Position the logo (header .logo) on the left with a minimum width and whatever height you want. Maybe fixed dimensions.

- Show the menu (header nav) in horizontal order with a maximum (whatever is available) width.

- Position the quote button (header .request-quote) on the right with a minimum width.

- Position the phone number (header .phone) group on the right with a minimum width, and its children (header .phone > *) as block elements. Phone icon is probably a background image, so the container gets a bit of padding-left to make space for it.

 

For responsiveness... well, it also depends on your tooling. With a Bootstrap-style approach you might move a couple of those header children around so that you could have the logo+quote+phone as one row and push the menu to a second row. If you want the menu as one of those three dots/bars things in a corner then that would be something else.

 

PS: Was the PNG logo converted from a JPEG? It has artifacts. Should clean that up.

Thank you for your reply.
The quote button should indeed be on the right hand side, what i should have said is that it ends up on the right hand side of the phone number, instead of on the left hand side of the phone number,

So i'd like it to be: icon >> nav menu >> request a quote button >> Phone number.

 

I will give what you have suggested a go and find a work around to make it responsive.

Thank you again for your swift reply.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.