- This topic has 8 replies, 2 voices, and was last updated 2 years, 3 months ago by David.
-
AuthorPosts
-
December 23, 2021 at 3:30 am #2057487Debbie
Hallo
Not sure how to achieve this. I have a secondary navigation at the very top of the website and all the menu items are justified to the right of the screen, which is where I want them. On the same line, but at the other end of the screen (justified to the left), I’d like to add some text.
I’ve added the text using a hook (generate_inside_secondary_navigation), but this appears in the middle of the screen.
So I’ve added a div class to this text like so –
Talk to us about your project – 00000 000 000.
And added this CSS to the customise, additional CSS like so –
.talk {text-align: right;
size: 13px;}But this doesn’t work. Am I missing something?!
It’s going to be difficult to add screenshots as this is something I’m working on locally, so nothing live yet.
Sorry if this is a simple question, but I’m a bit of a newbie to this and I’m making it up as I go along! π
Thanks
December 23, 2021 at 3:32 am #2057489DebbieSorry, the div class didn’t come out properly in the original query above. Here it is –
<div class="talk">Talk to us about your project - 0000 000 000</div>
Not sure what I’m doing wrong here, but don’t seem to be able to add the html – it seems to be stripped out whenever I try?
December 23, 2021 at 8:36 am #2057802DavidStaffCustomer SupportHi there,
is it possible to see the site ?
NOTE: in the forum, to display code, you must highlight the code, and click the code button before subimitting. I edited the above reply so you can see it now π
January 5, 2022 at 6:08 am #2069850DebbieHallo David – sorry for not getting back sooner – been manic at work since I got back this year! I’ve included a link to a folder where I’ve stored the images. Capture.png is what the header looks like at the moment – the highlighted text needs to be at the left hand side of the header and a smaller size to match the secondary menu on the right hand side (which looks fine and is exactly where I want it to be). I’ve also included a screenshot of the hook code and the additional css that I’ve added.
Is that clearer? Let me know if you need anything else.
Thanks – DebbieJanuary 5, 2022 at 6:31 am #2069877DavidStaffCustomer SupportOK – so Text alignment applies to the content within the container. Not the actual container eg.
div.text
In order to align the div.text i need to know what its sits inside of.Could your right click > inspect the div.text and share a screenshot of the developers tools > elements tab so i can see div.text and its surrounding HTML?
January 5, 2022 at 7:44 am #2069945DebbieAh – I’ve added the text as a hook element ‘generate_inside_secondary_navigation’, so as I understand it, the text is being added to within the menu itself, hence the positioning? I should be adding to the menu bar instead? I’ve added a link, so that you see what’s coming up in the elements tab.
I have a feeling I’ve done this completely incorrectly!! π – could you point me in the correct direction?! Thanks David – much appreciated.January 5, 2022 at 7:54 am #2070112DavidStaffCustomer SupportTry this CSS:
.secondary-navigation .talk { order: -1; margin-right: auto; }
January 10, 2022 at 8:29 am #2075608DebbieBrilliant!! That worked a treat – thanks David
January 10, 2022 at 8:34 am #2075613DavidStaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.