473,387 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Override the vspace and hspace with css

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.

May 31 '06 #1
6 15335
ct****@gmail.com <ct****@gmail.com> scripsit:
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/

May 31 '06 #2
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
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/


May 31 '06 #3
To further the education of mankind, ct****@gmail.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.
Jun 1 '06 #4
ct****@gmail.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.
Jun 1 '06 #5
He proffered a good answer?? Huh! His comment:
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.
You can't. _Some_ browsers will override them with css margins, others will not.

ct
Neredbojias wrote: To further the education of mankind, ct****@gmail.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.


Jun 1 '06 #6
>> 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.
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: ct****@gmail.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.


Jun 1 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Woodmon | last post by:
Example of my CSS follows: <style type="text/css" media="screen"> BODY { color: white } A:link { color: 66CCFF; } A:visited { color: CC66FF; } A:active { color: CC66FF; } A:hover {...
7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
5
by: Mark Broadbent | last post by:
Oh yes its that chestnut again! Ive gone over the following (http://www.yoda.arachsys.com/csharp/faq/ -thanks Jon!) again regarding this subject and performed a few of my own tests. I have two...
2
by: Flip | last post by:
In java, the default for methods is override. In c# that is not the case. This talks about two classes, the base class and the overriding class. What happens when you have a third class in the...
5
by: Stoyan | last post by:
Hi All, I don't understand very well this part of MSDN: "Derived classes that override GetHashCode must also override Equals to guarantee that two objects considered equal have the same hash code;...
15
by: John Salerno | last post by:
Hi all. I have a question about virtual and override methods. Please forgive the elementary nature! First off, let me quote Programming in the Key of C#: "Any virtual method overridden with...
2
by: Adriano Coser | last post by:
Hello. After I converted my .net code to the new VC2005 syntax I started to get C4490 on my ExpandableObjectConverter subclass overrides. The GetProperties method is no longer called by the...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
5
by: Marcel Hug | last post by:
Hi NG ! I'm new in C# and I'm reading a book about the fundamentals and concepts. In the chapter Methods it's written to use virtual, if i would like to override the method in a subclass. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.