HighDots Forums  

from <style> tags to style=""

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss from <style> tags to style="" in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jean Pierre Daviau
 
Posts: n/a

Default from <style> tags to style="" - 11-15-2007 , 05:57 AM






Hi to every one.

How can I manage to write this kind of css in a style="".

img {
width: 150 px;
height: 100 px;
text-align: center;
}

<img style=" img: ????????" src="" alt="|">

--
Thanks for your attention.

Jean Pierre Daviau
--
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp



Reply With Quote
  #2  
Old   
Johannes Koch
 
Posts: n/a

Default Re: from <style> tags to style="" - 11-15-2007 , 06:16 AM






Jean Pierre Daviau schrieb:
Quote:
How can I manage to write this kind of css in a style="".

img {
width: 150 px;
height: 100 px;
text-align: center;
}

img style=" img: ????????" src="" alt="|"
You don't need selectors in inline style. So it's just

<img style="width: 150px; height: 100px; text-align: center" ...>
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #3  
Old   
John Hosking
 
Posts: n/a

Default Re: from <style> tags to style="" - 11-15-2007 , 06:22 AM



Jean Pierre Daviau wrote:

Quote:
How can I manage to write this kind of css in a style="".

img {
width: 150 px;
height: 100 px;
text-align: center;
}

img style=" img: ????????" src="" alt="|"
Your question is how to move from embedded styles to inline styles.

Usually people go the other way, taking their in-line styles and moving
them to an embedded or external stylesheet, thereby centralising their
styles. But if you're sure this is what you want to do, here's how:

<img style="width:150px; height:100px; text-align:center;"
src="" alt="|">

150x100 is a pretty big divider image (based on your alt attribute).
Also, I don't know that the text-align:center will help much when
applied to an img element.

--
John


Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: from <style> tags to style="" - 11-15-2007 , 07:18 AM



John Hosking wrote:
Quote:
Jean Pierre Daviau wrote:

How can I manage to write this kind of css in a style="".

img {
width: 150 px;
^
height: 100 px;
^
Also *no* whitespace here...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
Bergamot
 
Posts: n/a

Default Re: from <style> tags to style="" - 11-15-2007 , 02:04 PM



Jean Pierre Daviau wrote:
Quote:
How can I manage to write this kind of css in a style="".

img {
width: 150 px;
height: 100 px;
text-align: center;
}
It's better to put the img width and height in as HTML attributes
because it will prevent the page from jumping all over as it loads. You
can override them in CSS if you really must.

As for text-align on an img, it isn't likely to do much. Per the specs,
text-align applies to block-level elements, table cells and inline
blocks. img is an inline element so the property should be ignored.

What is it you really want to do?

--
Berg


Reply With Quote
  #6  
Old   
Jean Pierre Daviau
 
Posts: n/a

Default Re: from <style> tags to style="" - 11-16-2007 , 07:43 AM



Quote:
You don't need selectors in inline style.
So simple

Quote:
It's better to put the img width and height in as HTML
attributes
because it will prevent the page from jumping all over as it
loads. You
can override them in CSS if you really must.
Ok

Thanks




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.