I’m using Dreamweaver. Starting from their standard 2 column with header and footer “template” (I removed the footer and its associated stuff from the CSS file), I put in two images, stacked atop each other. But there are ugly padding gaps between the top of the page and the top image, and between the two images.
I’ve searched and searched for ways to remove that padding, but nothing I put into, or remove from, the CSS works. I’ve found similar questions in Google searches, but either the thread ends with no resolution or the suggestion just doesn’t work! I’m getting really frustrated. Can anyone suggest anything?
Oh, thank fucking God. It was a nightmare trying to Google search this, but I should’ve known to try here first! Many praises to you, boy of poop, for your help!
(BTW, I do have another, much more minor question, if you don’t mind: I want to make a CSS rule that automatically puts padding between sidebar elements - usually graphics. But all the “margin” and “padding” changes I make change margins/padding for the entire set of contents, not between individual elements of those contents. How do I do that?)
Leaper, you would need for each of those elements to have a class or something else in common. If, for example, it was all images inside a DIV with the ID of “SIDEBAR,” you could try this:
#SIDEBAR IMG {padding:5px;} (to give all images a padding of 5px all around) #SIDEBAR IMG {padding:5px 0;} (to give all images a padding of 5px at the top and bottom, no extra padding to the left and right)
Well, I don’t have any List elements right now, so I don’t mind, and it doesn’t seem to be messing up anything else, so that’s all that matters to me right now.
Still, if I ever do have to worry about it in the future, what would you suggest doing “instead”? Just for future reference.
Just be prepared that some things will go all wackadoo from what you’re used to, and you will have to set the padding and margins for each element separately as it happens. If you make enough webpages you start to recognise the issues and how to fix them pretty quickly.
The problem with Lists is that they’re made up of a complicated arrangement of padding and margins to make the indenting and bullets work, so to get them looking right again is a lot of cocking about. But there are pretty good resources out there to help before you go completely insane.