HighDots Forums  

Override the vspace and hspace with css

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


Discuss Override the vspace and hspace with css in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ctilly@gmail.com
 
Posts: n/a

Default Override the vspace and hspace with css - 05-31-2006 , 01:37 PM






I have a 3rd party control that spits out an img tag with the vspace
and hspace attributes set to some ridiculously high number giving my
images too much margin. How can I use css to override these two
attributes?

Regards,

ct.


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Override the vspace and hspace with css - 05-31-2006 , 04:15 PM






ctilly (AT) gmail (DOT) com <ctilly (AT) gmail (DOT) com> scripsit:

Quote:
I have a 3rd party control that spits out an img tag with the vspace
and hspace attributes set to some ridiculously high number giving my
images too much margin. How can I use css to override these two
attributes?
You should really get rid of the problem (the 3rd party control, whatever
that means) instead of trying to wipe it under the carpet when CSS is in
use.

There is no _specification_ that says how vspace and hspace are mapped to
CSS properties. The natural expectations is that they are mapped to margin
properties, and this is how some browsers interpret them, but IE 7 beta
seems to treat hspace and vspace as creating special spacing that is applied
_in addition to_ margin and padding properties.

--
Yucca, http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
ctilly@gmail.com
 
Posts: n/a

Default Re: Override the vspace and hspace with css - 05-31-2006 , 05:40 PM



What do you mean "...3rd party control, whatever that means"? Are you
serious, you don't know what this means???

A 3rd party control is a server side control you buy from some vendor.
It is compiled so you have no access to the source hence you can't
modify/fix any problems. The HTML it spits out at run time is the html
you get. So if there are deprecated tags or attributes in their
control, you need to wait until the vendor updates the control.

I am well aware of everything you said with respect to the use of css,
but my influence in this world isn't so great that I can just call the
vendor up on the phone and make them fix the issue. So you can save
your sanctimonious preaching for someone else. You did nothing to
answer my question. If I had wanted a sermon I would've asked for one.

ct

Quote:
I have a 3rd party control that spits out an img tag with the vspace
and hspace attributes set to some ridiculously high number giving my
images too much margin. How can I use css to override these two
attributes?

You should really get rid of the problem (the 3rd party control, whatever
that means) instead of trying to wipe it under the carpet when CSS is in
use.

There is no _specification_ that says how vspace and hspace are mapped to
CSS properties. The natural expectations is that they are mapped to margin
properties, and this is how some browsers interpret them, but IE 7 beta
seems to treat hspace and vspace as creating special spacing that is applied
_in addition to_ margin and padding properties.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #4  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Override the vspace and hspace with css - 06-01-2006 , 09:35 AM



ctilly (AT) gmail (DOT) com wrote:
Quote:
What do you mean "...3rd party control, whatever that means"? Are you
serious, you don't know what this means???
Not everyone in the world is deeply familiar with features available in
..NET or similar technologies for generating HTML code.

Quote:
A 3rd party control is a server side control you buy from some vendor.
It is compiled so you have no access to the source hence you can't
modify/fix any problems. The HTML it spits out at run time is the html
you get. So if there are deprecated tags or attributes in their
control, you need to wait until the vendor updates the control.

I am well aware of everything you said with respect to the use of css,
That implies that you were already well aware about the part where Jukka
said CSS can't be used reliably to accomplish what you are trying to
accomplish. If you were already well aware that it can't, then why did
you ask if it can?

Quote:
but my influence in this world isn't so great that I can just call the
vendor up on the phone and make them fix the issue. So you can save
your sanctimonious preaching for someone else. You did nothing to
answer my question. If I had wanted a sermon I would've asked for one.
A two-line sentence is a sermon? (Certainly no more so than your
mini-sermon about how Jukka should know what a third-party control is.)
Moreover, all Jukka suggested, correctly, was that you might have to use
an approach other than the third-party control if you want to get rid of
the excessive space. He didn't say anything about telling the vendor to
fix the control for you.


Reply With Quote
  #5  
Old   
ctilly@gmail.com
 
Posts: n/a

Default Re: Override the vspace and hspace with css - 06-01-2006 , 12:08 PM



He proffered a good answer?? Huh! His comment:

Quote:
You should really get rid of the problem (the 3rd party control, whatever
that means) instead of trying to wipe it under the carpet...

was completely unnecessary. He doesn't know anything about my project
or the circumstances. I would love to get rid of the depreacted tags &
attributes. But this is why I mentioned they were coming from a 3rd
party control.

Your answer, however, is the more appropriate one. This is what I was
looking for, even if I disagree with your last comment. I responded
the way anyone who is offended would respond.

Quote:
You can't. _Some_ browsers will override them with css margins, others will not.
ct


Neredbojias wrote:
Quote:
To further the education of mankind, ctilly (AT) gmail (DOT) com vouchsafed:

I have a 3rd party control that spits out an img tag with the vspace
and hspace attributes set to some ridiculously high number giving my
images too much margin. How can I use css to override these two
attributes?

You can't. _Some_ browsers will override them with css margins, others
will not. Jukka proffered a good answer; you responded childishly.

--
Neredbojias
Infinity has its limits.


Reply With Quote
  #6  
Old   
ctilly@gmail.com
 
Posts: n/a

Default Re: Override the vspace and hspace with css - 06-01-2006 , 12:30 PM



Quote:
If you were already well aware that it can't, then why did you ask if it can?
I was looking for a hack, trick, or something clever that I didn't know
about.

Quote:
A two-line sentence is a sermon?
Implying that people are wiping things under the carpet when he knows
nothing of the project can be a little offensive. Getting rid of or
replacing the 3rd party control is not even an option. It is
entrenched in our's and many, many other organizations. That is why I
wish people who don't work with these technologies who say naive things
like "you should really just get rid of the problem" wouldn't answer
the question. If he didn't know what a 3rd party control was he should
have just left the question alone.

There are alternative ways to fix the problem though using javascript,
xslt or an ispai filter. They are just more complicated and I was
hoping a nice little css hack existed that I could use. That was the
premise of me asking the question in the first place.

ct



Harlan Messinger wrote:
Quote:
ctilly (AT) gmail (DOT) com wrote:
What do you mean "...3rd party control, whatever that means"? Are you
serious, you don't know what this means???

Not everyone in the world is deeply familiar with features available in
.NET or similar technologies for generating HTML code.

A 3rd party control is a server side control you buy from some vendor.
It is compiled so you have no access to the source hence you can't
modify/fix any problems. The HTML it spits out at run time is the html
you get. So if there are deprecated tags or attributes in their
control, you need to wait until the vendor updates the control.

I am well aware of everything you said with respect to the use of css,

That implies that you were already well aware about the part where Jukka
said CSS can't be used reliably to accomplish what you are trying to
accomplish. If you were already well aware that it can't, then why did
you ask if it can?

but my influence in this world isn't so great that I can just call the
vendor up on the phone and make them fix the issue. So you can save
your sanctimonious preaching for someone else. You did nothing to
answer my question. If I had wanted a sermon I would've asked for one.

A two-line sentence is a sermon? (Certainly no more so than your
mini-sermon about how Jukka should know what a third-party control is.)
Moreover, all Jukka suggested, correctly, was that you might have to use
an approach other than the third-party control if you want to get rid of
the excessive space. He didn't say anything about telling the vendor to
fix the control for you.


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.