Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inline Issue 1

Status
Not open for further replies.

bigmike93

Programmer
Aug 2, 2009
1
US
When I view the webpage in full screen it displays normally but when it is viewed not in full screen the last image goes on to the next line howcan I prevent that last image from going on to the second line and to stay of the first line nometter what the size of the screen is.

here is the code that I used.

<!DOCTYPE html
PUBLIC "_//W3C//DTD XHTML 1.0 Transitional//EN"
"

<html>
<head>
<title> Home Page </title>
<metahttp-equiv="content-type" content="text/html"; charset="utf-8" />
<style type="text/css">
body {background-color:blue;
margin-top:10px;
margin-left:10px;
margin-right:10px;
margin-bottom:15px;
padding-top:5px;
padding-right:5px;
padding-bottom:5px;
padding-left:5px;
border-width:10px;
border-style:eek:utset;
border-color:blue;
}
img {padding-right:2px;
padding-top:2px;
padding-bottom;2px;
padding-left:2px;
border-color:red;
border-style:inset;
border-width:10px;
}
div#topline {display:inline;
}


</style>
</head>
<body>
<div class="topline">
<img src="bannerlogo1.jpg" alt="Izz Tech" title="Izz Tech" align="left"/>
<img src="intellogo.jpg" alt="Intel" title="Intel" height="117" />
<img src="amdlogo.jpg" alt="AMD" title="AMD" height="117" />
<img src="nvidialogo.jpg" alt="Nvidia" title="Nvidia" height="117" />
</div>

</body>
</html>
 
Also, your styles should not apply to "topline" if your css is trying to apply them to something that is not a div.
I think you will find that your "topline" styles are meant to be like this:

div.topline {
}
 
I think that cygmorg is trying to point out that the "#" prefix in styles is used for the "id" attribute and the "." prefix for the "class" attribute.

As the "div" in your html has a "class" as opposed to an "id", your style definition should be "div.inline" and not "div#inline".



Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top