Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chrome Toolbar breaking website layout

I have an issue with Google Chrome: 19.0.1084.52 m when I have the Ask Toolbar installed it breaks the website layout.

See print screen: enter image description here

Is it usual behaviour that toolbars in Chrome would effect the website?

EDIT: I guess I should wrap everything inside a <div> and move the background-image from the <body> although is there a better option without adding this extra markup?

Website link

like image 370
John Magnolia Avatar asked Jun 08 '12 09:06

John Magnolia


People also ask

How do I fix my Google Chrome toolbar?

Your Google Chrome toolbar can sometimes go missing, especially if you're in full screen mode. Check the extensions and bookmarks menu to show the shortcuts in your toolbar. Press F11 on a PC or hover over the top-left corner on a Mac and click the green circle to exit full screen mode.

Where do I find tools on Google Chrome?

Google Input Tools Chrome extension Click the extension icon and select “Extension options” In the “Extension options” page, select the input tool you want from left to right. Double click on the left to add an input tool. Double click on the right to remove a selection.


2 Answers

A Javascript snippet can disable ask toolbar in chrome. I hope this function spreads quickly!!

function removeAsk(){
    if(document.getElementById("apn-null-toolbar") != null){
        // mainMenu had a style change for its top positioning, returning it to normal
        // perhaps a function can be made which iterates over every element ask has changed
        document.getElementById("mainMenu").style.top = "-16px";
        // Just remove the iframe and style elements
        (elem=document.getElementById("apn-null-toolbar")).parentNode.removeChild(elem);
        (elem=document.getElementById("apn-body-style")).parentNode.removeChild(elem);
    }
}

Call this method after body onload

<body onload="removeAsk()">
like image 53
Toby Avatar answered Nov 15 '22 06:11

Toby


There is no Chrome extensions API for creating a toolbar so mentioned extension must have created it via content script. What it means is that for each page you open, CSS and JavaScript files are injected by this extension to create a DOM element within the page acting as a toolbar. Problem with this solution is that using the content script it is possible to mess up website look or even the way it works.

like image 25
Konrad Dzwinel Avatar answered Nov 15 '22 07:11

Konrad Dzwinel