• Resolved Deborah Delin

    (@deborahdelingmailcom)


    Hi,

    I’ve created a new widget which I would like to use to display a clickable telephone number in the right hand area of the header. Depending on where I place the code in header.php (child theme) I can only get the telephone number/widget to display above or below the header, creating wasted white space.

    And I don’t manage to move it using css.

    https://www.photomobil.co.il/

    Firebug identifies the text as “top-right” “text widget” but I’ve tried all of the following and it doesn’t budge:

    #top-right textwidget
    #top-right
    .top-right
    .textwidget
    .top-right textwidget
    {
    top:200;
    z-index:550;
    }

    Any help would be very gratefully received.
    Deborah

Viewing 12 replies - 1 through 12 (of 12 total)
  • Start by limiting the width of your new widget. Currently it is as wide as your page content area.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    With CSS? Like this?

    #top-right textwidget
    #top-right
    .top-right
    .textwidget
    .top-right textwidget
    {
    top:-200;
    z-index:550;
    width:190px
    }

    Ok, I’ve done that but I still can’t get it to shift upwards on the page.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    If I give up on my home-made widget and put the text in the right hand widget area, how can I make its position relative without messing up the position of the image below in the same widget area?

    I currently have this css:
    #text-6{
    position:absolute;
    right:60px;
    top:115px;
    z-index:550;

    }
    But the problem is that if the width of the viewing window alters the text moves and covers the images in the header.

    https://www.photomobil.co.il/

    Thank you!

    Hopefully,

    Deborah

    I’ve done that but I still can’t get it to shift upwards on the page.

    You should now be able to use CSS to position it absolutely.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Sorry Esmi, it still doesn’t budge ??

    This is the CSS I am trying:

    #textwidget
    #top-right textwidget
    #top-right
    {
    width:190px
    position:absolute;
    right:60px;
    top:115px;
    z-index:550;
    }

    Can you see where I’m going wrong?
    Thank you!!

    It seems to be in the header area now.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    It’s above the header area. I want it to sit in the header area, below the menu bar.

    I can’t budge it!!

    Then adjust your top positioning.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    I am sure that as you say, Esmi, I need to change the width of the widget. But adding width:190px; to the style.css isn’t doing it. Do I need to do something to header.php?

    Adjusting top positioning has no effect. I think this code isn’t doing anything:

    #top-right textwidget
    #top-right
    {
    width:190px
    position:absolute;
    right:60px;
    top:300px;
    z-index:550;
    }

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Please oh please could a kind person explain to this CSS dummy how to moved this widget, with the telephone number text in it, down so that it overlays the header? None of my CSS has any effect on it.

    https://www.photomobil.co.il/

    Or alternatively suggest another way of getting a phone number to overlay the header? I tried putting it in a spare widget but when it is absolutely positioned it ends up covering the graphics when page width is adjusted.

    This small thing is driving me crazy please help!!

    Deborah

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Just in case anyone reads this, I have now positioned the text widget in the header area absolutely, but would still dearly like to know how what to do so that it doesn’t slide in and out when the page width is adjusted.

    Thank you,

    Deborah

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    I finally figured out how to get the clickable phone number in the header. But it isn’t a good idea. When it is positioned both relatively or absolutely it moves around and appears differently on different websites, and doesn’t appear at all on the narrow screen of an iPhone, which was the whole point.

    So goodbye to that idea and I’ll find another place to put the clickable phone number!

    Thanks for your help.
    Deborah

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Positioning a Widget in the Header’ is closed to new replies.