Jump to content


Divs instead of iFrames


5 replies to this topic

#1 Britgirl

    Young Padawan

  • Members
  • Pip
  • 2 posts
  • Gender:Female

Posted 22 July 2008 - 08:02 AM

Hi,

Firstly I apologise if this has been discussed before, I have looked through the forums briefly but couldn't find what I am looking for :)
I am trying to find help with some coding, I am about to make my website template up in PSP and normally if I use a template I have a content area in iFrames but I really don't want to use iFrames this time, I don't like the look of iFrames and the scrolling in the seperate box just irritates me but I am not sure what coding I need to use instead?
I read somewhere on the net that you can use Divs instead but I don't know how? I have an idea of what I want my site to look like and I would like the content area not to have a seperate scroll bar like you get when using iFrames, any ideas?

Any help would be most appreciated! ;)

#2 Hoot

    * Hooty Tooty Fruit *

  • Members
  • PipPipPipPip
  • 1,346 posts
  • Gender:Male
  • Location:Canada
  • Interests:Making Websites, Working in 3D, Playing the Drums

Posted 22 July 2008 - 10:34 AM

Well Div's are the "new" way to make a site without using tables. Most sites before that used tables to set up the content either with CSS or without (just by setting up the table proporties). Using Div's and CSS speeds up a websites load time and they are much cleaner than tables. Now basically with the Iframe you would want to take all that content off that page and remove the Iframe and set it up with Div's. It would be a quite quick and easy task as long as you know CSS, but even if you don't you could still do this.

I don't really know if you have worked with CSS and Div's before but here are some tutorials for beginners: http://www.pixel2lif...uction%20CSS/1/

Hoot

#3 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 341 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 22 July 2008 - 11:21 AM

<style>
#content {
width: /* whatever you want the width to be */;
height: /* whatever you want the height to be */;
overflow: auto; /* this will automatically create a scroll bar for the div tag, not iframes it will be a div tag */
border: #000000 1px solid; /* solid black border */
background-color: transparent; /*whatever the background color is, this will be the same */
}
</style>
<div id="content">
</div>

Edited by bigdfbc2008, 22 July 2008 - 11:21 AM.


#4 Hoot

    * Hooty Tooty Fruit *

  • Members
  • PipPipPipPip
  • 1,346 posts
  • Gender:Male
  • Location:Canada
  • Interests:Making Websites, Working in 3D, Playing the Drums

Posted 22 July 2008 - 12:33 PM

If you actually read the post it says that Iframes are not wanted (the whole scrolling thing) so thats really not something thats needed.

Hoot

#5 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 341 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 22 July 2008 - 02:14 PM

Well luckly for them they are able to remove the line of coding. i added that in, just in case they ever changed their mind...

#6 Britgirl

    Young Padawan

  • Members
  • Pip
  • 2 posts
  • Gender:Female

Posted 31 July 2008 - 03:35 AM

thankyou so much for your help! :biggrin: I will most certaintly be looking up those tutorials :P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users