You need to Register for free and Login to post a message in the forum.

Forum

Assign a css id to a module.
Last Post 2008-06-03 10:41 AM by Lee Sykes. 9 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chris O'RourkeUser is Offline
Nuke Newbie
Nuke Newbie
Posts:4

--
2008-05-20 09:58 PM  
For all I know there could already be a module that does this but it would be fantastic if under advanced settings there was the ability to tell a text/html or any other module to use a specific class or id without digging into skin files.

For example if I wanted a text/html module to float right I'd just update the skin.css and then under advanced properties type in the name of the id or class.

The attached image shows what I mean a bit better.

1520584768171.jpg

Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9008
Avatar

--
2008-05-21 02:54 AM  
Use the Header and Footer of the advanced module settings to wrap a div tag around the module, and specify the css class to be used.



Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Chris O'RourkeUser is Offline
Nuke Newbie
Nuke Newbie
Posts:4

--
2008-05-21 05:09 PM  
That's what I've been doing so far however that adds extra divs which isn't the most semantic way to do things. By adding the ability to specify a specific css class or id for a module you can clean up and speed up the site as well speed up development time.


Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9008
Avatar

--
2008-05-22 01:58 PM  
I agree. Why don't you make that suggestion at dotnetnuke.com.



Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Chris O'RourkeUser is Offline
Nuke Newbie
Nuke Newbie
Posts:4

--
2008-05-22 04:53 PM  
Thanks for the suggestion jncraig. I've made the suggestion: http://support.dotnetnuke.com/issue...&PROJID=23



Joseph CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9008
Avatar

--
2008-05-23 05:14 AM  
Great. The whole community gains when people make suggestions.



Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2008-05-23 01:50 PM  
Each module does already have a unique ID assigned to it.

For instance, go to: http://www.dnncreative.com/tabid/75...fault.aspx

Using the web developers toolbar go to the Information menu / Display ID & Class Details

From here you can see the main Text / HTML module has a unique ID of #dnn_ctr380

There are various variations of this ID, you will be able to view:

#dnn_ctr380_contentpane .dnnC_content_transparent DNNAlignleft
#dnn_ctr380_ModuleContent
#dnn_ctr380_HtmlModule_lblContent .Normal

We can target the main content area of the Text / HTML module with:

#dnn_ctr380_contentpane
{
border: 10px solid orange;
}



Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2008-05-23 01:51 PM  
For further info on the web Developers Toolbar view:Troubleshooting DotNetNuke Skins


Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
Chris O'RourkeUser is Offline
Nuke Newbie
Nuke Newbie
Posts:4

--
2008-05-23 07:00 PM  
I'm a huge fan of the web developers toolbar. The problem is those unique identifiers are too unique since the unique id's are assigned dynamically as you add modules to a page giving you much more extra work in the backend customizing your aspx files rather than letting you use a minimal amount of divs and styles.

If I wanted to style the top left text/html module on all of my pages without rewriting the module or adding extra divs I'd need something like:

#dnn_ctr408_ContentPane { background: #e3e3e3; float:left; width: 165px; }
#dnn_ctr409_ContentPane { background: #e3e3e3; float:left; width: 165px; }
#dnn_ctr410_ContentPane { background: #e3e3e3; float:left; width: 165px; }
#dnn_ctr411_ContentPane { background: #e3e3e3; float:left; width: 165px; }
#dnn_ctr412_ContentPane { background: #e3e3e3; float:left; width: 165px; }

and on and on depending on the number of pages I have in my site.

However if I can assign an id or class of my own choosing then I'd only need to add "#TopLefttextbox" and it would work on all of my pages.

The way the current method is there's no real intrinsic difference I can see between the old preCSS method of every element having font tags and background colors as part of the source rather than the current css method of abstracting layout completely from the source code.


Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2008-06-03 10:41 AM  
Yes for multiple instances the unique ID method will not be suitable, but for one off styling it is very useful.

the method I currently use is to specify elements in special containers. - this way if you need a "float right" div adding to a text HTML module, you can do it by simply using that container on the module,  so you no longer have the problem of multiple entries of code.

But, it still won't be as simple as the idea you have mentioned,  it will be interesting to see if it is implemented, thanks,


Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
You are not authorized to post a reply.

Active Forums 4.3

Latest Forum Posts

iPhone website logo in DNN root directory by JohnnieD
I'm trying to put an iPhone logo that I made into my site so when someone saves the website on their
RE: Fixed size container by Joseph Craig
Use an HTML module and style the container to have a fixed height and width. Set the overflow attr
Fixed size container by Aggiedan97
I am looking for advice or an actual container that has a fixed height (and width). An HTML module w
RE: DNN 6.1 app_offline.htm by Joseph Craig
If the site "works" in Chrome, Firefox and Safari, but not in IE8 look to IE8 as the problem. It is
RE: DNN site automatically redirects to a different domain name. by Joseph Craig
Make a copy what is in the portalalias table and then remove all but the localhost entry. Verify th
DNN 6.1 app_offline.htm by Dave Hassall
Hi As recommended I have successfully been using the app_offline.htm whilst performing upgrades t
RE: DNN site automatically redirects to a different domain name. by imran shaikh
Hi i have done same as mention in this post my dnn folder name is Trademaxomanupg with
Enforce Terms Tutorial Update by Vistalogix Corporation
I tried configuring my DNN 6.1.2 install to have a required "accept terms" checkbox as described in
RE: Best Practices for Modifying a Custom Module by Joseph Craig
Start up the development website, then install the module using the package that you have. Then, yo
Best Practices for Modifying a Custom Module by schilders
Good Morning, I'm needing to modify a custom built module created by another developer targeted f
RE: Admin menu problem by alireza arabiyan
hi in localhost i have http://localhost/senf/خانه.aspx and http://localhost/senf/Admi
RE: Admin menu problem by Joseph Craig
Yes, that is what you should have done. What is the URL for your home page? What is the URL for
RE: Admin menu problem by alireza arabiyan
hi first in localhost i add my domain.com as portal alias. then copy all files to host , restore my
RE: Admin menu problem by Joseph Craig
How did you move it? Have you added an entry in the portalalias table for the site's domain name?
RE: Re: SQL SERVER 2008 R2 Remote connection by Joseph Craig
Set up a user with dbo privileges and set the connection string for that user, rather than using Win
Re: SQL SERVER 2008 R2 Remote connection by Prakasam Srinivasan
I have successfully configured MSSQL Server 2008 r2 remote connection. I am using windows 7 and it h
Admin menu problem by alireza arabiyan
hi i installed dnn 6 on localhost and move it in my host, all link's , pages and modules are ok,
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config procedure
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config
dnn 4.4 upgrade issue by imran shaikh
hi this is imran i am upgrading dnn 4.4 to dnn 6.0.2 and getting this error please help me for this
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds