I am struggling with getting divs to resize along with a browser. If you manually resize your browser with your mouse, I'd like the main logo div to resize along with it. I know it's kind of a petty problem since most people will be viewing the page full screen. The #lg div is the one I'd like to gradually size down with the browser window size. The first time I set the width and height to auto it worked, then I was messing around with some other div options and all of a sudden it stopped working. I've tried to re-write the code several times with no luck. I'd certainly appreciate some advice on how to tackle this.
Unless there is no other way, try to avoid using absolute positioning. There are nearly always more flexible and yet robust methods of putting elements into the place you want them.
I took a couple screen shots to describe what I'm trying to accomplish. Is there a way I can embed those in this thread? Sorry for all the questions, I'm new here. And thanks up there Doc for updating my code posts.
I am struggling with getting divs to resize along with a browser. If you manually resize your browser with your mouse, I'd like the main logo div to resize along with it. I know it's kind of a petty problem since most people will be viewing the page full screen. The #lg div is the one I'd like to gradually size down with the browser window size. The first time I set the width and height to auto it worked, then I was messing around with some other div options and all of a sudden it stopped working. I've tried to re-write the code several times with no luck. I'd certainly appreciate some advice on how to tackle this.
Here is the HTML:
And the CSS:
sorry guys, how do you post code successfully? I haven't used this forum before..
post in codepen.io and save it and copy the url and post
I've updated your post for you. Just got to make sure you tab four spaces. Read more on Markdown
Unfortunately, we don't have access to your images so we can't tell how this is supposed to look.
Do you have a mock-up/image of what your design is?
Here's another thing.
Unless there is no other way, try to avoid using absolute positioning. There are nearly always more flexible and yet robust methods of putting elements into the place you want them.
Hey guys,
I took a couple screen shots to describe what I'm trying to accomplish. Is there a way I can embed those in this thread? Sorry for all the questions, I'm new here. And thanks up there Doc for updating my code posts.