Home  >  Article  >  Web Front-end  >  Please help. Is the image centered or stretched? _html/css_WEB-ITnose

Please help. Is the image centered or stretched? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:18:201677browse

0fbb2c80fae137dc5b4908ff460f1e5e
  59094e4f4c69efda1193cc4f27d5045e
     a34de1251f0d9fe1e645927f19a896e8
       b6c5a531a458a2e790c1fd6421739d1c 1759927a49a8181a4829b3586177a1fe2a05572ec04800183a3cc54f5b302ae85db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edf
       b6c5a531a458a2e790c1fd6421739d1c 6808fed49e3ecfe5d05810c581635b7739190769bde0cf6a2af580e70a5a8e925db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edf
       b6c5a531a458a2e790c1fd6421739d1c cc63bab62b09e67458f62b17b54335d0e291918a30d9244cbffafbe9f17062185db79b134e9f6b82c0b36e0489ee08edb90dd5946f0946207856a8a37f441edf
     fd273fcf5bcad3dfdad3c41bd81ad3e5
   f16b1740fad44fb09bfe928bcc527e08
16b28748ea4df4d9c2150843fecfba68


1. How to set the picture in the table to be placed in the center of the div;
2. How to set the background picture of the div to stretch horizontally instead of tile effect.


Reply to discussion (solution)

2. Can't
1. Isn't it three columns? Why is it still centered?

2. Can't
1. Isn't it three columns? Why is it still centered?


Now the effect is like this. I want to put the picture in the black box

What is the IE? Why does mine not have this problem? Guess:

table{ border-collapse:collapse;border-spacing:0}tr,td{margin:0;padding:0}

In addition, when adjusting the format, if there are problems, it is best to add borders to them (border: 1px solid #ddd);

How come I don’t have this problem? Guess :
XML/HTML code?12345678table{ border-collapse:collapse;border-spacing:0}tr,td{margin:0;padding:0}
In addition, when adjusting the format, if there are any problems, please So that they can all add borders (border: 1px solid #ddd);

Firefox browser

My firefox looks like this. Your situation does not appear

Mine Firefox looks like this. Your situation does not appear.

This is probably the cause.

a

{
display:block;
}
a#setpage:link,a#setpage:visited
{
background:url(image/designerimg/setpage- link.png);
}
a#setpage:hover{
background:url(image/designerimg/setpage-mouseover.png);
}
a#setpage:active{
background:url(image/designerimg/setpage-click.png);
}



His question

CSS code?1234a{ display:block ;}

His question

a{   display:block;}

If you remove this, the effect of changing the picture during the link process will not work. Does the hero have any clever tips? I'm a novice in CSS, I'm learning as I go, please give me some advice


Let's change the layout. Don't use tables. It's troublesome to watch.

CSS code?12345678910111213141516171819202122232425262728293031 32333435363738394041424344453d36d7c3ce8e45bdd73ef727f53b57b37c8107cdebc3bab0783640477bc4f042 b2386ffb911b14667cb8f0f91ea547a76e916e0f7d1e588d4f442bf645aedb2f