1 reply [Last post]
evvo
evvo's picture
Offline
newbie
Last seen: 3 years 40 weeks ago
Joined: 2016-02-25
Posts: 1
Points: 2

i am trying to align an image logo left of some text elements (ideally an H1 and H2)

i have 2 divs floated left within a container div (relative position)

first div contains the image which is resized width: 30%.

however while the img correctly resizes, the div containing the image seems to stay the width of the real image size, therefore my div with my text elements do not align close up to the right of the image, due to the width of the image div.

what is the way to fix this so the image containing div is the same width as the resized image within it?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 day 10 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9745
Points: 3824

HTML source?

How about a link, or at least the source of that part of the document? Without the html (and the applicable css) we can only guess at the solution.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.