Spacer gifs into css?
Wondered how to convert all my spacer gifs into css - no idea how to.
Was going to start on this simple page
Thanks for any tips/advice.
I think the response you're going to end up with is that you don't need the spacer gifs. That's the whole point behind CSS.... you have absolute control over the positioning and therefore don't need them.
But if you want to make more work for yourself than necessary I suppose you could make a div container for each spacer gif and position those as well.
My post was in fact to ask HOW to use css instead of spacers - which of course I don't want to use. So how do I seamlessly replace current spacers with css?
Set the appropriate margins and padding on the elements so as to give the required space between them.
Danke schone - will try this
Start by removing the tables and thinking about what the content of the page MEANS. It's a heading/banner and several lists. (Menus are lists of links.) The main content could be described by a definition list with the location being the "term" and the addressing info being the "definitions." And there's a footer of course.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Well, there are many other ways to do so, especially that the (*.gif) spacer is too old now and CSS is made for this.
First of all, try using the "margins" property :
Or the text indent :
Or simply, use the padding method :
/* Write it in a list, and remove the bullets */
<li>Bla bla blaa</li>
<!-- The list item and spacing have been formatted in the style tag -->
Or just leave some space using the entity .. (NOT REALLY GOOD THOUGH)
<!-- Great if you're using a table for your layout -->
<td class="space">bla bla blaa</td>
Last edited by • MaNiC MoE •; 07-10-2007 at 12:57 AM.
Reason: Fixed some mistakes and removed extra uneeded tags!
Great - helpful, thanks much
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)