Unwanted border underneath Search when using "Fixed"

Author Posts

Powersolo

I have a search box on the right side. There is no border assigned. If I use a “relative” for Position, there is no border and looks fine but floats back and forth. I want a “fixed” position. But when I use that, it puts a white border all across the bottom. I can’t get rid of the border. And I don’t want a border. Is there a way to get it to go away?
I use a Mac, Safari 6.0.5, Mac osX 10.8.4, and microthemer 3.4.1.
thanks,

Randy


Sebastian

Hi Randy,

If you can post or email (https://themeover.com/support/contact/) me a link to your website I can advise you more specifically.

My guess for now is that you might want to try using ‘absolute’ for the positioning. You will need to set position to ‘relative’ on an element that is the parent of the search box first. Try double-clicking near the search box to target the element that is a container (parent) for the search box. Once you have created a selector for this container element, set the position value to ‘relative’. Don’t apply any top/bottom/left/right values. This will keep the container element in it’s normal place. Setting position to ‘relative’ by itself (generally) doesn’t do much. It just allows for ‘absolute’ positioning of child elements relative to the position of the container element. It’s a bit complicated I know, if you click on the icon for ‘Position’, ‘Top’, ‘Left’ etc the CSS reference explains things in a bit more detail.

Having set position to ‘relative’ on the container element, you can set the position of the child search box to ‘absolute’. Play around with the top/bottom/left/right values a bit. You can set negative numbers (e.g. -20px). Using ‘absolute’ position may solve your odd border problem. I find that strange and unpredictable things can happen when using position ‘fixed’. And I try to avoid it. It’s one of the only CSS values that’s been around for a long time that still surprises me.

I hope that helps, please do send me a link to your site if it doesn’t.

Cheers,
Sebastian

You must login or register to reply to this topic.