Jump to content

Unwanted line feeds in layout


Guest thimk

Recommended Posts

Guest thimk

I know HTML and some CSS. PHP and templates are steep learning curve for me. In HTML, I can

prevent unwanted line feeds, do other stuff, with <table>..</table> structure.

An example: for index.tpl [Killer], I have {SEARCH_FORM} {SESSION}, which injects LF between them.

How might this LF be prevented, and spacing be controlled?

Is there a suitable tutorial for this?

thnx

Link to comment
Share on other sites

Guest vrakas

Is there a suitable tutorial for this?

Not really, there are resources in the internet that might help you out with this.

What i use is the xpx and the x% to get the desired spaces

Link to comment
Share on other sites

Guest thimk

I said I know HTML rather well. My problem is not in adding LFs and spaces, but preventing CC from doing so without my permission. I already use x%, and wish CC would use that more, in place of x px. My example was to have {SEARCH_FORM} {SESSION} on the SAME line, no inserted LF.

Link to comment
Share on other sites

The default break occurs because, in the template files that produce the content for each of those, there are enclosed divisions. You may easily make these go onto the same line by floating one alongside the other.

As to line breaks with the session content or search content, if they exist, you may edit them out with straight html in

skins/.../styleTemplates/boxes/session.tpl or searchForm.tpl

:pirate:

Link to comment
Share on other sites

Guest thimk

You may easily make these go onto the same line by floating one alongside the other.

"by floating" = what? Do you mean to merge <div>?

Thanks.

Link to comment
Share on other sites

If you are familiar with HTML but not CSS, then you will be familiar with the deprecated way of floating text alongside an image by using align=left within the img tag.

The correct and accepted way to float items rather than stacking them is to use styles float: left; or float:right; with any block-level element. So, in the session.tpl file, use an existing division (the outer one) and put style="float: left" inside the <div> tag.

In search form, there is sometimes a break <br /> that you'll want to remove.

Look at ALL the .tpl files in your skins folder. They are html - with the XTemplate php cues for parsing (the cues look like HTML comment tags - they tell PHP where to begin and end the parsing of specific sections when it creates the html that is added into the templates). And the variables {...} Basically, everyhting else in the .tpl files is strictly HTML and css.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...