/    Sign up×
Community /Pin to ProfileBookmark

Ok, I’ve really been trying to become table-independant. [U]Really.[/U]

I’m really having trouble understanding how SPAN and DIV are helping me, though.

It was my understanding that SPAN could be placed on the same line as another SPAN and they wouldn’t break to the next line.

So I put two SPANs in a DIV and I got a line-break. I also continue to have to use relative positioning to get things where I want them ( as an direct result of the SPANs breaking lines).

I mean.. what am I doing wrong?

[code]
[size=2]
<STYLE>
.zeBox {display:box; font-size:12px; background-color:#007BF9; color:#FFFFFF; height:35px; width:140px; border: solid 1px #000000;}
.zeBox1 {display:box; font-size:12px; background-color:#007BF9; color:#FFFFFF; height:35px; width:180px; border: solid 1px #000000;}
.blank {list-style-image:url(“/images/icons/structure/_blank.gif”);}
</STYLE>
<DIV ALIGN=”center”>
<H1><STRONG>Information Systems Flight</STRONG></FONT></H1>
<DIV ALIGN=”center” CLASS=”zeBox”>
<B>SCB</B> <BR>
Flight Commander</FONT>
</DIV>
<BR>
<DIV ALIGN=”center” CLASS=”zeBox”>
<STRONG>SCB-1</STRONG><BR>
Flight Superintendent
</DIV>
<BR>
<DIV ALIGN=”center”>
<SPAN CLASS=”zeBox1″>
<STRONG>SCBA</STRONG><BR>
Admin Comm
</SPAN>&nbsp;
<SPAN CLASS=”zeBox1″>
<STRONG>SCBB</STRONG><BR>
Network Operations
</SPAN>&nbsp;
<SPAN CLASS=”zeBox1″>
<STRONG>SCBT</STRONG><BR>
Tech Control
</SPAN>&nbsp;
<SPAN CLASS=”zeBox1″>
<STRONG>SCBI</STRONG><BR>
Info Security
</SPAN>
</DIV>

<DIV STYLE=”text-align:left; position:relative; left:125px;”>
<LI CLASS=”blank”>&nbsp;Internet Services</LI>
<LI CLASS=”blank”>&nbsp;Records Management</LI>
<LI CLASS=”blank”>&nbsp;<A HREF=”CSM/default.asp”>Computer Systems Mgt</A></LI>
<LI CLASS=”blank”>&nbsp;NATO Registry</LI>
<LI CLASS=”blank”>&nbsp;<A HREF=”Software_Training/default.asp”>WGM/Software Training</A></LI>
</DIV>

<DIV STYLE=”text-align:left; position:relative; top:-95px;left:315px;”>
<LI CLASS=”blank”>&nbsp;Network Control Ctr</LI>
<LI CLASS=”blank”>&nbsp;<A HREF=”NCC/DMS/default.asp”>Electronic Message Ctr</A></LI>
<LI CLASS=”blank”>&nbsp;Infostructure</LI>
<LI CLASS=”blank”>&nbsp;Network Admin</LI>
<LI CLASS=”blank”>&nbsp;Info Protection Ops</LI>
<LI CLASS=”blank”>&nbsp;<A HREF=”HelpDesk/default.asp”>Help Desk</A></LI>
<LI CLASS=”blank”>&nbsp;PC Maintenance</LI>
</DIV>

<DIV STYLE=”text-align:left; position:relative; top:-228px;left:505px;”>
<LI CLASS=”blank”>&nbsp;Tech Control</LI>
<LI CLASS=”blank”>&nbsp;Wideband Maintenance</LI>
<LI CLASS=”blank”>&nbsp;C2 Systems Admin</LI>
</DIV>

<DIV STYLE=”text-align:left; position:relative; top:-285px;left:695px;”>
<LI CLASS=”blank”>&nbsp;COMSEC</LI>
<LI CLASS=”blank”>&nbsp;<A HREF=”IA/default.asp”>Info Assurance</A></LI>
</DIV>
<DIV STYLE=”position:relative; top:-170px;”>
<P STYLE=”text-indent:15px”>
The Information Systems Flight is responsible for the operation, maintenance and sustainment of the Wing’s wide area network.<BR>
The Network Control Center, or NCC, includes e-mail, Defense Messaging Systems (DMS), file and web server, network security<BR>
and help desk functions. The flight also manages the wing’s Communications Security (COMSEC), Records Management, NATO Subregistry<BR>
and Computer Systems Management programs. Our flight, made up of over 70 personnel in four different career fields, supports the nearly<BR>
6,000 personnel on-base and at our geographically separated units.</P>
</DIV>
</DIV>
[/size]
[/code]

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisJul 22.2003 — A plain SPAN tag is an inline element. However, when you apply a DISPLAY attribute to it, you make it a block element. Hence, you get a line break.
Copy linkTweet thisAlerts:
@NicodemasauthorJul 22.2003 — But if you copy and paste the info into a web page, you'll

notice that the SPAN elements are all on the same line.

I tried to do the same thing with the list items, by placing them all in a division and spanning them out, but I ended up having to use relative positioning to make them stop line-breaking.

What I'm trying to say is, the one's that are in block style ALL stay on the same line without me positioning them to do so.
Copy linkTweet thisAlerts:
@David_HarrisonJul 22.2003 — Use this:

display:inline;
Copy linkTweet thisAlerts:
@NicodemasauthorJul 22.2003 — Hmm.. possibly I am just retarded, but that doesn't seem to work.

I've tried applying the inline display to a division surrounding my list items, and to spans that contain the list items.
Copy linkTweet thisAlerts:
@David_HarrisonJul 22.2003 — Hmm, maybe you can't use display:inline; with relative positioning then. What you could try is removing the relative positioning and put all of your divs into another block div and position that where you want it, then apply widths to all of your div's with li's in to get the correct horizontal positioning that you require.

I hope this makes sense but if it doesn't here's an example of what I mean:

<div style="position:relative;left:100px;">

<div style="display:inline;width:100px;">

<li>Hi</li>

<li>There</li>

</div>

<div style="display:inline;width:100px;">

<li>Hello</li>

<li>Again</li>

</div>

</div>
Copy linkTweet thisAlerts:
@toicontienJul 22.2003 — They first thing thing I always do when playing around with a tableless layout is design to a W3C spec for HTML and CSS. I usually shoot for XHTML 1.0 and CSS 2.0. You could use HTML 4.01 transitional or strict if you like. You can validate your code at http://validator.w3.org/

The reason I make sure pages validate to a W3C standard is that browsers as of about 2001 all utilize doctype switching, meaning that if your pages validate as a web standard for HTML and CSS, then it "forces" the browser into standards compliance mode.

If your pages do not validate as standardized HTML and/or CSS, the browser will work in quirks mode, and I've found that each browser then can have its own "quirks," making it exeedingly difficult to predict how each browser will react to the code I write.

I know my post isn't the code to solve your problem, but it is the first step in the right direction.

Some usefull links:

http://www.w3.org/

http://validator.w3.org

http://www.w3schools.com

http://www.alistapart.com // I [i]really[/i] like this site for dealing with tableless layouts.
×

Success!

Help @Nicodemas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...