user7512972
user7512972

Reputation:

Text wrapped to right of image not aligning to the top of the page

On my website, I have some text that wraps to the side of my image. I have the parent container for both of these aligned to the top of the page, but the text does not follow. Can you help the text come in line with the image, like in a navigation bar.

body {
    padding: 0px;
}
#icon-top-corner-wrapper {
    width: 35px;
    height: 35px;
    background-color: lightBlue;
    padding: 5px;
    float: left;
}
#icon-top-corner {
    width: 100%;
}
#toolbar {
    margin: 0px;
    padding: 5px;
}
<div id="toolbar">
    <div id="icon-top-corner-wrapper">
        <img alt="Digytool Icon" id="icon-top-corner" src="https://system.digytool.com/img/icon/digytool.png" title="Digytool">
    </div>
    
    <div>
        <h1>
            Digytool
        </h1>
    </div>
</div>

Upvotes: 0

Views: 31

Answers (1)

user7512972
user7512972

Reputation:

With the help of @Mostafa Baezid I solved it by adding

body {
    margin: 0;
} 
h1 {
    margin:0
}

to my CSS to close the gaps.

Upvotes: 1

Related Questions