0

I am pretty new on CSS and wanted to know when it is the right time to use a # before the name eg. #footer . Also while I am here please could someone tell me how to make text rap in a div tag.

Thanks for your help.

5
Contributors
13
Replies
14
Views
11 Years
Discussion Span
Last Post by tgreer
0

The pound sign (#) denotes a reference to an id, and the period (.) refers to a class:

#footer { background-color: lime; }
.indent { margin: 0px 20px 0px 20px; }

<div id="footer">...</div>
<div class="indent">...</div>
0

And, since multiple items cannot have the same id, you would typically use a class for styles that you wish to apply to several items.

Text in a DIV will automatically wrap.

0

Thanks for the great responses. Say if for some reason my text is wrapping in a div or table, how could I stop it.

0

It depends. There are a some CSS declarations for you to research:

First look at the 'overflow' properties, particularly overflow: scroll .If you're using tables, look at white-space: nowrap and also the min-width property.

0

I have looked at a couple of those and they have help, thanks. I am really getting into this css thing, it very easy (with the right help) to get exactly what you want. Thanks guys.

0

No, I'm not new and I can do everything with css I have ever wanted to. My new site photoshopthis should prove this. It will be up online on the 1st novemeber.

0

Not any more! I have done alot with css since then and as they say practise makes perfect.

0

He means that it is good you think that practice makes a man perfect. Dont get him wrong, he is just trying to help you out.

0

Closing this thread, since the question was answered and we're spiraling into pointless misunderstandings. This is just a housekeeping measure and doesn't imply that anyone said or did anything wrong. Cheers!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.