ASPX页面设计中的问题 [英] Problem in design of the aspx page

查看:95
本文介绍了ASPX页面设计中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

在我的CMS项目中,我使用了具有文本中心对齐功能的asp.net菜单.对于表,我使用了tds左对齐文本.
现在我有一个问题,我所有的菜单文本都左对齐.当我检查源代码时,我发现asp.net菜单也在生成tds.因此,对于asp.net菜单的tds,将应用默认的td css设计.

我的CSS设计能力很弱.

谢谢与问候
TanzeelurRehman

Hi Every one

In my CMS project i have used asp.net menu having text center align. For table i have used text align left for tds.
Now i am having a problem that all my menu text became left align. when i checked the source i found that asp.net menus are also making tds. so to the tds of asp.net menu the default td css design applies.

I am weak in css designing.

Thanks and Regards
TanzeelurRehman

推荐答案

为什么不将CSS中的文本对齐方式更改为右对齐?
Why dont you change the text-alignment to right in the css?


您需要更多地使用CSS的功能必须对将哪些样式应用于哪些元素更具选择性.然后,您可以定义不仅影响特定类型的所有标签的样式.

CSS选择器可能会变得非常复杂,但是简单使用类是一个好的开始.
像这样的东西:

You need to make more use of the features CSS has to be more selective about what styles get applied to what elements. You can then define styles that don''t just affect all tags of a particular type.

CSS selectors can get quite complex, but simple use of classes is a good start.
Something like:

<td class="MyTD">
...
</td>



在您的HTML中,并且

[注意DOT指示这是一个类选择器]



in your HTML, and

[note the DOT indicating this is a class selector]

.MyTD
{
text-align:left;
}



在您的CSS中. MyTD只是CSS类的标识符-用您发现的描述性内容替换.

W3Schools是CSS,HTML和许多其他Web东西的不错的常规资源.参见 http://www.w3schools.com/css/css_reference.asp [



in your CSS. MyTD is just an identifier for a CSS class - substitute whatever you find descriptive.

W3Schools is a good general resource for CSS, HTML and lots of other web stuff. See http://www.w3schools.com/css/css_reference.asp[^]


这篇关于ASPX页面设计中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆