2 replies [Last post]
Dayve
Dayve's picture
Offline
newbie
Last seen: 6 years 1 week ago
Timezone: GMT+1
Joined: 2014-09-13
Posts: 1
Points: 2

Hi, I have been teaching myself Html and css for over 6 months now and even though I can proudly say that I do understand quite a bit of it, I must admit that having nobody to teach me face to face is what is stopping me fully understand Html & Css.
My question might make me look silly but for the life of me, I have no choice but to post it. LOL
Basically, I have a div at the top and a div at the bottom of the page. When I play around with the top div like add margins...etc the div at the bottom moves down the screen. I understand the box model and know that div elements are block elements. My question is how do I stop the div at the bottom from moving down when I edit the top div? Is it to do with the positioning of the div? The display element? ....
Help.

Thanks

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 5 hours 20 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

Show us your markup and css

We can only guess if we can't see what you've done.

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.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 4 years 4 days ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

Position Relative to the rescue

@Dayve you would probably have to use Position:relative on the first div and than use the Top , right, left , bottom properties to move the first div around , without affecting the bottom div .

but still having a look at your code would help ! . Use JSfiddle and make a fiddle , if you don't know how to make a JS fiddle , go on youtube and have a look , ITS ONE OF THE BEST TOOLS A BEGINNER CAN PICK UP .

Cheers .

Gautam.