Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

table border attribute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rodchar - 20 Mar 2008 22:32 GMT
hey all,
is it possible to make the table border attribute dynamic? For example, is
there a way to make it where i can set it in a style sheet?

thanks,
rodchar
Nathan Sokalski - 21 Mar 2008 00:12 GMT
Sure, just use the CSS border property. For example:

<table style="border:2px solid black;">

would give the table a solid black border with a width of 2px. You can
obviously also use the other CSS border properties, such as border-width,
border-style, border-color, etc. Something that I often do when modifying
borders in tables is place the styles for the borders in the individual td
tags so that I can do more customization for the table's appearance, but
this can depend on your specific situation.
Signature

Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

> hey all,
> is it possible to make the table border attribute dynamic? For example, is
> there a way to make it where i can set it in a style sheet?
>
> thanks,
> rodchar
Sam Allen - 21 Mar 2008 00:44 GMT
You could dynamically add text to a stylesheet so that you can change the
border style based on some arbitrary logic. Style1.InnerText += "table {
border: solid 1px black; }". That works well if you are using master pages
and content pages. (Style1 is the id of the style element.)

Sam
http://dotnetperls.com/

> hey all,
> is it possible to make the table border attribute dynamic? For example, is
> there a way to make it where i can set it in a style sheet?
>
> thanks,
> rodchar

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.