finally built a site using only CSS (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


lilblackgirl -> finally built a site using only CSS (10/3/2006 9:10:18)

i've been attempting this for some time, but never had a site I'd built be small enough to attempt, but i finally had one. No tables whatsoever.

http://www.stepbeyond.com/

my question is about spacing though. there are a number of spots within the one page that i've had to add a bunch of <br> to get the spacing to look right and how the client wanted it. Is there something within CSS that i can use to do this? I've used line height within the div container where the content is, but some of the lines require different heights. Is there an easier way to do this other than using a dozen <br>s?

thanks




caz -> RE: finally built a site using only CSS (10/3/2006 9:24:01)

You could put that row in a new div and set the spacing there, or you could make use of the h tags and use a class to style them differently.

ie.
quote:

<b>Retained    Contingency     Contract</b><br><br>


There are a number of ways to approach this but you really do need to make use of header tags anyway - it helps with the semantics if nothing else. [;)]





lilblackgirl -> RE: finally built a site using only CSS (10/3/2006 9:36:16)

so anywhere i want an addtional break, i just create a class for it and assign it to the line i want? tell me it's not that simple. [:D]

any other suggestions?




caz -> RE: finally built a site using only CSS (10/3/2006 9:55:42)

Well you could do but that is almost the equivalent of using spacer gifs [;)] What I meant was that you could change the line heights ( or anything) in the new classes to what you needed for a quick fix.




Tailslide -> RE: finally built a site using only CSS (10/3/2006 10:17:55)

As Caz said it's not a good idea to use divs unecesarily - just for presentation that is. You can however just style the stuff you've already go in there - for instance if you have a list and want to add space below it (and to make it easy assume that this list is in a div called content) then you'd just do:
#content ul {margin-bottom:20px;}


or whatever.

If you have a particular paragraph that you want to add space below then you could assign a class to the paragraph and add margin-bottom in much the same way.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.140625