2 replies [Last post]
Bennes
Offline
newbie
Last seen: 10 years 19 weeks ago
Joined: 2009-09-09
Posts: 2
Points: 0

When I write about html and css,I want to make the width of page will be auto,so I will set style as width:100%.

If I also need margin left about 100px,for compatible ,I will add

as header.So at IE,FF,OPEARa,the facture width is 100%+100px,the scrollbar will be exist.what can i do? :bigoops:

Bennes
Offline
newbie
Last seen: 10 years 19 weeks ago
Joined: 2009-09-09
Posts: 2
Points: 0

for example: <!DOCTYPE HTML

for example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
 <HEAD>
  <TITLE> New Document </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 </HEAD>
 <BODY>
 
<div style="width:100%;margin-left:100px;height:10px;background-color:gray;"></div>
 </BODY>
</HTML>

I hope that there doesn't have scrollbar

BBLinda
Offline
Regular
Last seen: 10 years 9 weeks ago
Timezone: GMT-4
Joined: 2009-08-31
Posts: 14
Points: 0

I am quite new to CSS

I am quite new to CSS myself, but I wanna try to help Smile

I think, the first question is, what should be 100% of the width, do you want a background image or color to stretch?
Because text for example, will probably not be 100% I guess, more like 90% or so, and you can handle this with div's or paragraphs.