Помощник
|
Div width=100% более ширины окна браузера |
pivkos
|
Сообщение
#1
|
||
|
|
||
|
|||
pivkos
|
Сообщение
#2
|
|
Вот пример кода с описанной выше проблемой:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html> <head> <title>Див по ширине страницы</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> html, body { margin: 0px; padding: 0px; width: 100%; height: 100%; } #wrap1 { margin: 0 auto; } #content1 { position: relative; width: 1200px; height: 1000px; background-color: blue; } #content2 { position: relative; margin-left: 1200px; width: 200px; height: 200px; background-color: green; } #footer { width: 100%; background-color: red; } </style> </head> <body> <div id="wrap1"> <div id="content1">Content 1 <div id="content2">Content 2</div> </div> </div> <div id="footer">Footer</div> </body> </html> |
|
|
www3_hb |
9.2.2011, 19:05;
Ответить: www3_hb
Сообщение
#3
|
|
Попробуй так
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html> <head> <title>Див по ширине страницы</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> html, body { margin: 0px; padding: 0px; width: 100%; height: 100%; } #wrap1 { margin: 0 auto; width:1200px; } #content1 { position: relative; width: 100%; height: 1000px; background-color: blue; } #content2 { position: relative; margin-left: 1200px; width: 200px; height: 200px; background-color: green; } #footer { width: 100%; background-color: red; } </style> </head> <body> <div id="wrap1"> <div id="content1">Content 1 <div id="content2">Content 2</div> </div> </div> <div id="footer">Footer</div> </body> </html> |
|
|
pivkos
|
Сообщение
#4
|
|
Увы :(
|
|
|
Apay |
9.2.2011, 20:05;
Ответить: Apay
Сообщение
#5
|
|
попробуйте #wrap1 и #footer заключть еще в один див
|
|
|
pivkos
|
Сообщение
#6
|
|
|
Проблема решена, всем спасибо!
|
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
Англоязычный SEO-копирайтинг от $3/100 слов от NeedmyLink | Первая статья бесплатно | 2 | Needmylink1 | 973 | 25.3.2024, 21:22 автор: Needmylink1 |
|
Через какой браузер и как можно найти в кэшэ браузера видео | 10 | Room | 1929 | 23.3.2024, 7:41 автор: Room |
|
Dao.AD: пуши, попсы и не только! ТОП монетизация и арбитраж. | Акция 100 % отчисления! | 82 | Daopush | 25760 | 22.3.2024, 20:23 автор: Daopush |
|
IPgate - мобильные, резидентные, 100% чистые прокси с ротацией, полученные этическим способом | 8 | IPgate | 2703 | 22.3.2024, 16:39 автор: IPgate |
|
Incogniton - управляйте множеством браузерных профилей. 100% антидетект! | 101 | Incogniton | 32339 | 18.3.2024, 1:19 автор: Incogniton |
Текстовая версия | Сейчас: 28.3.2024, 20:52 |