Reading stylesheet in .vb

  • Thread starter Thread starter matt urbanowski
  • Start date Start date
M

matt urbanowski

Hi,
I have a stylesheet (.css) file with classes in e.g.
..csHeader_tdLogo
{
background-position: top left;
vertical-align: top;
background-image: url(Images/Header_Logo.gif);
width: 171px;
background-repeat: no-repeat;
height:50px;
}

Is there anyway in vb.net 2003 to read the value of the height in the
actual server-side code?
i.e. in VB, there is an object called 'Style'. Can we populate this
object with the values of .csHeader_tdLogo?

Thanks in advance,

Matt
 
IMO your best bet is to explain what is the problem you are trying to solve.

--
Patrice

"matt urbanowski" <[email protected]> a écrit dans le message de
groupe de discussion :
(e-mail address removed)...







- Show quoted text -

Hi,
Well I have a main form with several frames on it. In the top frame,
there is an image which has the style I showed above.
This style has a height to it.
However, if you increase the height of this image, it does not change
the height of the actual frame so part of the image will get cut off.
Is there anyway I can change the height of the frame dynamically based
upon just the height within that style?
I was trying to do it by using the <% %> tages within the frame
properties.

Thanks
 
If frames are used just to put together different parts you could consider
to use master pages. It allows to create a single logical document making
respective layout issue likely much easier instead of having two unrelated
parts (frames are basically to make each part work apart and should likely
be very rarely used if at all). Should users be able to move the splitting
line between those frames at will ?

It's been a long time since I tried them so I'm not sure how you could
handle this issue. In the worst case you could read programmatically the
style sheet (perhaps once and keep the height around) and you could then
render the frameset using this value to set the height for the corresponding
frame (or just set it once for all, I assume you do"nt change this image and
htis height very frenquently ?). I'm not sure if another CSS approach only
is possible (the idea would be to siez the frame automatcially depending on
its contents).

My first move would be to ask myself what is the purpose of those frames and
to replace them if possible...

Good luck.

Patrice,
Thank you for your answer. Unfortunately, we have to use frames since
it has the splitter bar. I think reading the stylesheet
programmatically would be the only way.
Would be nice if you could do:
Dim MyStyle as Style
MyStyle.LoadStyle(filename,stylename)
But can't!

Thanks,
Matt
 
Back
Top