


Some centering issues with HTML-CSS-! The Great God Returns_html/css_WEB-ITnose
CSS html
I added*{ margin:0px; padding:0px;}
to the style. How can I center the table without deleting all margins and setting them to 0px!
Please let me know!
Thank you!
Yeah!
Reply to discussion (solution)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>好看的广告</title><link rel="stylesheet" type="text/css" href="help/index.css"/><style type="text/css">*{ margin:0px; padding:0px;}</style></head><body><div id="top"><table id="lk" align="center"><tr><td align="center" valign="middle" height="30px"><h1>普通的图片切换</h1><span style="color:#F00; font-size:12px;">这个效果请别用IE浏览器观看</span></td></tr><tr><td class="ss"><div><b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b><div id="shows" class="b d1 k"><div name="div_xz" class="on" onmouseover="show(this)">1</div><div name="div_xz" onmouseover="show(this)">2</div><div name="div_xz" onmouseover="show(this)">3</div><div name="div_xz" onmouseover="show(this)">4</div><div name="div_xz" onmouseover="show(this)">5</div><div name="div_xz" onmouseover="show(this)">6</div><div name="div_xz" onmouseover="show(this)">7</div></div><b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b></div></td></tr><tr><td align="center" valign="middle" height="30px"><h1>图片逐渐的切换</h1><span style="color:#F00; font-size:12px;">这个效果请用IE浏览器观看</span></td></tr><tr><td class="ss"><div><img id="img_zj" class="lukang" src="img/1.jpg" width="700" height="290" /></div></td></tr><tr><td align="center" valign="middle" height="30px"><h1>图片滚动的切换</h1><span style="color:#F00; font-size:12px;">这个效果什么浏览器都OK</span></td></tr><tr><td><div id="img_gd"><ul id="ul_img"><img src="img/1.jpg" width="700" height="290" /><img src="img/2.jpg" width="700" height="290" /><img src="img/3.jpg" width="700" height="290" /><img src="img/4.jpg" width="700" height="290" /><img src="img/5.jpg" width="700" height="290" /><img src="img/6.jpg" width="700" height="290" /><img src="img/7.jpg" width="700" height="290" /></ul></div></td></tr></table></div><script type="text/javascript" src="help/index.js"></script></body></html>
No one?
Everyone in the forum is dead
Please give you the table you want to center, or redefine the div margin:0px auto;
For example, give you the table definition above , one #lk{margin:0px auto;} is enough
Please redefine the table or div you want to center margin:0px auto;
For example, give you the above table definition, one # lk{margin:0px auto;} can
Brother, you saved my life! Can I take you as my teacher? Or add QQ to ask you questions later!
Thanks! Send me QQ email lukang94520@163.com
My QQ 1029131145

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

The necessity of registering VueRouter in the index.js file under the router folder When developing Vue applications, you often encounter problems with routing configuration. Special...
