| 
	
 | 
 Posted by Ben C on 05/25/07 15:58 
On 2007-05-25, jobs <jobs@webdos.com> wrote: 
> sorry for the noob question. 
> 
> I know I can position a div tag in hmtl as such.. 
> 
>  <div id=ccc style="align:bottom;position:absolute;left:1px;width: 
> 200px;height:300px;border: ghostwhite thin ridge;float-right"> 
> hello 
></div> 
 
Almost. There's no align property, but you might be thinking of 
"vertical-align". And you need float: right, not float-right. 
 
> is there any way to do all of this in css? 
 
You have already done it in CSS. The string inside the style attribute 
_is_ CSS. 
 
> I tried this with no luck. I know the css is taking some effect 
> because i set background-color in the body entry and it worked. 
> 
><div id="ccc"> 
> hello 
></div> 
> 
> css: 
> 
> #ccc 
> { 
>  position:absolute; 
>  left:200px; 
>  top:400px; 
>  width:200px; 
>  height:300px; 
>  border: ghostwhite thin ridge; 
>  color: red; 
>  background-color:blue; 
> } 
 
That looks fine, there's no reason why it shouldn't work. You need to 
post a URL. 
 
> Another question, when should I use DIV and when should I use SPAN? 
 
Whichever you want really. Usually DIV for block-level things and SPAN 
for inline-level things. Use the other HTML elements unless there isn't an 
appropriate one for what the element contains.
 
  
Navigation:
[Reply to this message] 
 |