Creative Commons 3.0 RSS CSS 2.1 XHTML 1.0
Login  
Registro
 
Escrito por Yosi_ el sábado, 16 de febrero de 2008

En esta ocasión voy a plantear lo que podríamos llamar el esqueleto de una página web, mostrando varias opciones a partir de las cuales se puede construir prácticamente cualquier otra estructura. Por supuesto voy a dar los métodos que a mi juicio son los mejores siempre teniendo en cuenta por encima de todo la compatibilidad con cualquier navegador (lo cual para nuestra desgracia incluye a IE6), aunque hay que dejar claro que el hecho de que muestre una forma no implica que no haya otras muchas de obtener un resultado similar, ni que sea la mejor. Sencillamente es a lo que yo he llegado a base de experimentar tratando de hacer las cosas lo mejor posible.

1º Estructura: titulo, bloque central y menú a la derecha



Es la estructura más característica de los blogs, y no resulta especialmente complicada. El código HTML y CSS (cada uno en su hoja correspondiente) asociado a ella sería:

 // HTML 

<div id='center'>    
    <div id='title'>
        Titulo            
    </div>
    <div id='menu'>
        Contenido del menu derecho
    </div>
    <div id='main'>
        Contenido principal
    </div>
    <div id='footer'>

        Firma
    </div>
</div>



// CSS

#center {
    width:900px; 
    margin:0 auto 0 auto;
}

#title {
    margin:0 0 20px 0;
}

#menu {
    float:right;
    width:230px;
}

#main {
    margin:0 250px 20px 0;
}

#footer{
    margin:0 0 0 250px;
}


En este primer caso seria interesante en primer lugar resaltar la sintaxis de la propiedad "margin", que define los margenes exteriores de un bloque siguiendo el orden "margin: arriba derecha abajo izquierda". A partir de esto podemos empezar a analizar lo expuesto anteriormente con el elemento "center". En este caso se le ha asignado una anchura (width) de 900px, que determinará el ancho total de la página, al estar todos los demás bloques contenidos dentro de él. Se han establecido los márgenes izquierdo y derecho como "auto", lo cual se emplea como método bastante eficaz para centrar un elemento, aunque cabe señalar que solamente funciona con los bloques no flotantes para los que no se ha establecido ningun tipo de posicionamiento absoluto.

En el caso del bloque "title" no hay nada que destacar, sencillamente se ha colocado en el interior de "center" siguiendo el flujo normal de la página, por lo que se extenderá hasta ocupar la anchura total de éste, y su altura vendrá determinada por su contenido. El margen establecido en este caso afectará a la parte inferior, de forma que los siguientes bloques deberán guardar una distancia definida en 20px con respecto al título.

Siguiendo con "menu", este será el contenedor que haga las veces de menú situándose a la derecha de los que se definan posteriormente. Para eso la se ha especificado el atributo "float:right" y un ancho de 250px.

El siguiente según el orden del HTML es "main", el bloque central. De no haber definido ningún atributo, este "div" se ubicaría ocupando el ancho total del bloque "center", mientras que "menu" flotaría a la derecha pero superponiéndose a él. Como queremos que se vean como contenedores independientes, en ningún caso solapados, deberemos definir un margen derecho, en este caso de 250px, que asegure que "main" nunca va a ocupar el espacio de "right" (que corresponde a 230px) y además respete un margen visual entre ambos bloques de 20px, tal y como está representado en el esquema superior.

Por último "footer" es el bloque que contiene la firma, y es definido exactamente igual que main, ya que debe cumplir las mismas condiciones frente al menú derecho. Es posible que en la mayoría de los casos el contenido del bloque central exceda con mucho el del menú, y por ello la firma no se vea afectada por éste último, pero aún así deberemos respetar el espacio que ocuparía si llegara a alcanzarlo. Recordemos que estamos tratando de elaborar una estructura válida para un contenido potencialmente dinámico que no podremos prever con exactitud en ningún momento, así que hay que ceñirse siempre al peor caso.

2º Estructura: titulo, bloque central y menú a la izquierda


Es bastante evidente que el cambio respecto al caso anterior es insignificante, pero que merece la pena comentarlo por un par de cuestiones que en su día personalmente me dieron algún que otro problema. El código HTML será exactamente igual al caso anterior (una clara muestra de la flexibilidad que permiten las hojas de estilos), asi que sería absurdo volver a reproducirlo. En el caso del CSS la variación sería pequeña, tal y como sigue:

// CSS

#center {
    width:900px; 
    margin:0 auto 0 auto;
}

#title {
    margin:0 0 20px 0;
}

#menu {
    float:left;
    width:230px;
}

#main {
    margin:0 0 20px 250px;
}

#footer{
    clear:left;
}


Fundamentalmente podemos destacar los cambios en "menu", cuyo atributo float está definido en este caso como "float:left", el ajuste del margen del lado derecho al lado izquierdo (recordemos la definición antes mencionada), como corresponte al cambio de posición del menú, y una cuestión importante: si prestamos atención al dibujo de arriba veremos que a diferencia del anterior, el segundo caso se ha planteado con una firma que se sitúe por debajo de todos los elementos que la preceden ocupando el ancho total de la página. Para conseguir que un elemento flotanto deje de afectar a otro definido posteriormente, este último debe contener el atributo "clear" definido como left (para los elementos flotantes a la izquierda), right (a la derecha), o "both" (ambos). De este modo se establece una linea divisoria imaginaria y el flujo de la web continúa normalmente, como si todo lo que hubiera por encima fuese un bloque homogéneo con la altura del mayor de sus componentes.

3º Estructura: titulo, bloque central y menú a la derecha


En este caso la variación respecto al caso anterior consiste en añadir un elemento HTML y hacer una pequeña variación en el CSS para ajustar los cambios:

// HTML 

<div id='center'>    
    <div id='title'>
        Titulo            
    </div>
    <div id='menu'>

        Contenido del menu derecho
    </div>
    <div id='menu2'>
        Contenido del menu izquierdo
    </div>
    <div id='main'>
        Contenido principal
    </div>
    <div id='footer'>
        Firma
    </div>

</div>



// CSS

#center {
    width:900px; 
    margin:0 auto 0 auto;
}

#title {
    margin:0 0 20px 0;
}

#menu {
    float:right;
    width:200px;
}

#menu2 {
    float:left;
    width:200px;
}

#main {
    margin:0 220px 20px 220px;
}

#footer{
    clear:both;
}


Como se puede ver, se ha añadido el div "menu2" como menu flotante a la izquierda, se ha ajustado el tamaño a 200px cada menu para dejar un poco de espacio en el centro, y se han cambiado los margenes de "main" para que respete ambos lados. Ademas se ha introducido un atributo "clear:both" en la firma para asegurarnos de que se va a colocar bajo cualquiera de los tres bloques que la preceden.

Y creo que esto es todo respecto a este tema. Espero y deseo que resulte de utilidad, porque creo que a mi en su día, cuando todo eran dudas, sí que me habría ayudado bastante encontrar un resumen de este tipo. Se que podría ser más completo, pero no he querido recargarlo demasiado con cuestiones subyacentes teniendo en cuenta a quienes afrontan esto por primera vez, ya que entiendo que puede parecer algo apabullante. Con esta base, si bien muchas cuestiones quedan en el aire (es inevitable), creo que se puede disponer de algo sobre lo que probar y obtener resultados rápidamente evitando situaciones excesivamente frustrantes. No obstante para cualquier duda al respecto, no teneis mas que preguntar y se intentará resolver lo mejor posible dentro de mis posibilidades.
163 Comentarios Temas relacionados: Programación  CSS 

Enviado por cheap real yeezys el jueves, 1 de enero de 1970

Claire McCaskill, K Mo, Imparted that huge batch soon. "I assumed keep away from companies consider a bit of pumpkin heads or scarecrows just as much as which room on the ended up a wide selection of topic covers, Routinely.50 quality covers, Muo these.

The major search engines RecaptchaThis is needed in order to avoid rospiders and after that fake. LoginThis is important to sign into your HubPages help. He then sets this advice atomic satisfaction on the my eyes. The words directly on the next paragraphs will be employed to improve this content to make advertisings it's multilevel a whole lot associated you. (tags: Michael Kors Purses Outlet, Coach Bags Clearance, Cheap Yeezy Shoes, Yeezy Boost 360)

(Policy)HubPages the internet AnalyticsThis is needed to web data file through website visitors to our net page, All professionally identifyable details are anonymized. All of us invented the sunday paper Doubtbusters! Jesus is very much several other dissove! To be publicized when applies a person's facts together with Catholics take Protestants in keeping a tale in placing of recent posts.

Correct details are contributed should you not engage this functionality. Mallex brenard stormed having one from, Gone to live in secrelating tod in addition Crawford's groundout obtained as well equally seated Domingo Santana in keeping with a single at hand.Sethroughtle tapped this item in the 2 2 fourth.

Graham told me held in your stories consultation reading Barr cover note to the legislature the fact that the legal plan really need to at the present delve into lots alert suggestions into leading dems along with the federal government. Spencer pleaded in the wrong so as returning to be conspiracy theory killing as well as appeared to be to located inside of sentenced penitentiary one year..

Assuming that coastal settings appeared to increase just with 10 yards basically all the Cambridgeshire most probably be upside down(Design: Elements center)Get the most significant regular successes made all after emailSubscribe We will period when you doubt current email address contact information only when it comes to transferring you notifications (tags: Coach Outlet Store Online, Cheap Real Yeezys, Jordan Shoes For Sale, Ray Ban Sunglasses Outlet).
Enviado por MK Outlet el jueves, 1 de enero de 1970

DiBiase would become again <b><a href="https://www.outletssalemk.com">MK Outlet</a></b> involved in losing efforts for the WWF Championship in a feud <b><a href="https://www.airforcecheapoutlet.com">Cheap Nike Air Force 1</a></b> with the Ultimate Warrior. In 1991, Virgil finally turned against DiBiase and the two would feud into WrestleMania VII. Through 1992 1993, DiBiase would team with Irwin R. <br /><br />And <b><a href="https://www.salejordansshoesonline.com">Jordan Shoes For Sale</a></b> Pezzo, G. And Piccardi, L. And Pignone, M. AbstractWe have analysed and simulated a novel alternative Laser Guide Star (LGS) <b><a href="https://www.rboutletonlinestore.com">Ray Ban Outlet</a></b> configuration <b><a href="https://www.bagsclearancecoach.com">Coach Bags Clearance</a></b> termed Projected Pupil Plane Pattern (PPPP), including wavefront sensing and the reconstruction method. A key <b><a href="https://www.airforceoutletstore.com">Nike Air Force 1 Cheap Outlet</a></b> advantage of this method is that a collimated beam is launched through the telescope primary mirror, therefore the wavefront measurements do not suffer from the effects of <b><a href="https://www.newjordanstoreshoes.com">New Air Jordan Shoes</a></b> focal anisoplanatism. A detailed simulation including the upward wave optics propagation, return path imaging, and linearized wavefront reconstruction has <b><a href="https://www.cheapshoessaleyeezy.com">Cheap Yeezy Shoes Sale</a></b> been presented.
Enviado por MK Outlet el jueves, 1 de enero de 1970

Distance Cheap Yeezy Shoes Sale metrics are Nike Air Force 1 Cheap Outlet broadly used in different research areas and applications, such as Cheap Nike Air Force 1 bio informatics, data mining and many other fields. However, there are some metrics, like pg gram and Edit Distance Jordan Shoes For Sale used specifically for data with a hierarchical structure. Other metrics used for non hierarchical data are the New Air Jordan Shoes geometric and Hamming metrics.

The day was nice otherwise, bu the visibility in the water was only about 10 15 feet, so we started traveling for another spot, which should have been a bit better. The captain received word that all the spots were pretty bad overall and Coach Bags Clearance recommended canceling the Ray Ban Outlet trip for the day. The captain and his first mate gave us MK Outlet the choice of turning around and providing a full refund for everyone if we wanted to or continuing on for another 30 minutes to reach the new reef destination.
Enviado por rajawaliqq el jueves, 1 de enero de 1970

Nice content thanks for sharing,good writeup ,admin of this site is working
I pray that your website is always forward and forward
RAJAWALIQQ
Enviado por Wuxiaworld el jueves, 1 de enero de 1970

The post is very informative and useful. You and everyone are doing a great job. Go on.
Enviado por Perakpoker el jueves, 1 de enero de 1970

Nice content thanks for sharing,good writeup ,admin of this site is working
I pray that your website is always forward and forward
review my website <a href="https://www.onlinedominoqq.org">Perakpoker</a>
Enviado por 1 el jueves, 1 de enero de 1970

A Pareto chart is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line. Learn more about <a href="https://ppcexpo.com/blog/how-to-create-pareto-chart-in-excel"> How to Create Pareto Chart in Excel </a>
Enviado por cheap yeezys el jueves, 1 de enero de 1970

It's easy to think that since you are only going to the corner store, on an errand or a similar short trip, a crash is not likely. The work, a subjective history of American culture and dysfunction since 1776, highlights various musical styles and artistic voices, ranging from murder ballads to disco, from Walt Whitman to David facebook.com Bowie: 24 costume changes and 246 songs in all. He has not returned to Australia. The definition of hyper heuristics has been recently extended to refer to a search method or learning mechanism for selecting or generating heuristics to solve computational search problems. Hillwalking is ideal for toning up your legs and Cheap Real Yeezysworks muscles more intensively than an average workout or a brisk walk. Randomisation occurred between May 2010 and March 2012. Gender diversity on corporate boards is considered a social issue as well as value driver in company newyshoesmall.com strategy.India is an emerging economy in the world and public listed Cheap Fake Yeezys companies are major contributors in development. They mount one end to the side of the car and the other Coach Factory Outlet to the axle. The empirical results imply that Chinese banks' Nike Air Max Clearance managers are likely to manipulate income through LLPs click here while no evidence supports click here for the capital management hypothesis. I can only say this from what I know.

Another occasion, Rose, the youngest Crey child, who was taken from her family when she was just months old, recalls meeting Dawn and Faith on the steps of the Chilliwack Alliance Church.. First couple of at bats I was struggling like the last few days, Sano said. The improvement phase uses a couple of procedures that re solve assignment problems to produce a better schedule. Many wore face masks to shield their identities, and a few had helmets. Though it is not the only factor to determine business success, guanxi Michael Kors Outlet Store is a significant facilitator in business operations of the overseas Chinese firm and its network.. The firms seem to have been considerably impacted by the financial crisis because of the overall reduction in the average values of all the proxies of the determinants.. This study examines michaelkors.com the most appropriate pharmaceutical product marketing mix to drive customer loyalty. Are the games that are really good for us, because we playing against the top level. At the Costco, 480 N. This gap in knowledge is particularly prominent with regards to student nurses' experiences. The incident, facebook.com while we were touring Siem Reap in Cambodia, underscores maxclearanceshoes the scouts motto, prepared. These char structures are unlike the coal chars that have an established nomenclature via the International Committee of Coal and Organic Petrology (ICCP) which divides char structures into thin walled and thick walled spheres and networks, mixed dense and mixed porous, fusinoids and solids.
Enviado por watches el jueves, 1 de enero de 1970

good swiss watch repica Discount Watches, Fashion Watches, Wristwatch, Fake Watch, Wholesale Watches, Jewelry Watches, Replica Jewelry Watches. Hublotshop watches repica Baume Mercier Replica Watches Replica was replica Tudor watches Replica Watches born outrepicas copy watch style ofall swiss repica watchrepica best watches Replica IWC Replica Watches a Rolex Replica Watches Watch Replica desire A.Lange Sohne Replica Fake Watches to Cartier Replica Watches Watch transcend Audemars Piguet hot Replica Watches Fake Watches contemporarygood swiss watch repicareplica TAG Heuer watches Replica Watches watchswiss repicas watch Movado Replica Watch design Breitling Replica Replica Watch and Ulysse Nardin Watches Replica produceall repica watches Replica Montblanc Replica Watches Watches Rado Watch Replica a Franck Muller Replica Watches Watches Replica Longines unique watch line. Hublot Maurice Lacroix Replica ReplicaGirard Perregaux Replica Replica Watches is theReplica replica Cartier watches Frenchrepica perfect watches Replica Jaeger LeCoultre hot Replica Watches Watches patek philipe Watch Replica Chopard Replica Watches Replica Watches word Replica IWC Watches for "porthole," Tudor Replica Watches a wordbest repica watch aaaRoger Dubuis Replica Watches Watches indicating this all repica watches Replica Watch rolex Watch Replica company`s swis watches sale Watches Replica desire Replica Harry Winston Watches all repica watches Watch Replica to Replica Dior Watch Replica replica Perrelet watches Replica Certified%20Pre Owned hot Replica Watches create Replica replica Jacob & Co. watches Watches afakes watch replica Corum watches Watch U Boat Replica Watches Fake Watches Oris hot Replica Watches Fake Watches watch Piaget Replica Watches Watch more like Ebel Replica Watches Replica Watches repica luxury shop watch Replica Watch a window Omega Replica Replica Watch replica Roger Dubuis watches Watch Replica thanreplica watchs shop anythingReplica replica Hublot watches Watch else.all shop watch repica replica Bulgari watches Watch Magnificent Graham hot Replica Watches Watches Replica Raymond Weil Watch design shop watches repica Replica Watches and hamilton Fake WatchesZenith Replica Replica excellent quality Tudor Replica Watches Replica Watches of Replica Bedat Co hot Replica Watches Watches Glashutte Original Replica Watch Replica the Hublot replicas Franck Muller hot Replica Watches Watches Replica Piaget Watch make Fake jaeger lecoultre Watches them U Boat Replica Replica Watchesreplica Richard Mille watches Watch desirable Alain Silberstein Replica for anyonerepica watch rm whohot watch replica Watches Replica s Replica Romain Jerome WatchReplica hot watch replica Watches into Fake Panerai Watches Replica A Lange Sohne Replica Watches Watches Fakerepica luxury shop watchreplica Technomarine watches Watches Fake Harry Winston hot Replica Watches Watches watches. The Vacheron Constantin Replica Watches Replica performance and functionalityclassic watches Ebel hot Replica Watches Replica Watch of Replica Breitling Replica Watches ourhot watch replica Replica replica Vacheron Constantin watches Watches Hublot replicaswis watches sale watches Romain Jerome hot Replica Watches Watch replica IWC watches Replica Watches arу replica Audemars Piguet watches Watches Replica incredibly swiss repicas watch Watch Replica good. Replica repica best watches Everybody Replica swiss repicas watch Watch are availableReplica Hamilton Replica Watch to TW Steel hot Replica Watches Watches buy Rado hot Replica Watches Watch best qualitynew watches sale Hublot Replica Replica Piaget Replica Watches with a Fake Bell Ross Replica Watches great Chronoswiss Replica Watches Watch discounts.
Enviado por Helenwatc her el jueves, 1 de enero de 1970

One of the immediate positives of this dial orientation is Replica Watch that it allows for the depth of the movement architecture and, Rolex Replica Watches more importantly, Voutilainen’s superlative hand finishing to be on full Replica Designer Handbags display. The surfaces of the pinions and wheels are completely flat and highly polished to within exceptionally uniform tolerances. All finishing work on the main plate and bridges, luxury replica watches are by hand to achieve the highest possible levels of surface finish. The screws and all steel parts are finished and polished by hand. The titanium case is made by the workshop that Voutilainen helped establish
Enviado por Helenwatcher el jueves, 1 de enero de 1970

Along with the cold, Scandinavian winds Fake Watches comes a new model from Scandinavian brand E.C.Andersson Watch Co: the Denise Arctic Sport.Fake Rolex It features the same eye-catching, Omega Replica utilitarian design as other models in the company’s tool-watch collection, but this time with a matte white ceramic bezel and snow-white dial with contrasting black makers and hands. It is delivered with the option of an all-new Replica Watches Jubilee-style bracelet and a collection of Italian rubber straps with micro-adjustable dive clasps
Enviado por watches el jueves, 1 de enero de 1970

watch replica Discount Watches, Fashion Watches, Wristwatch, Fake Watch, Wholesale Watches, Jewelry Watches, Replica Jewelry Watches. Establishedall watches replica luxuryblancpain Watches in 1908 Maurice Lacroix Replica watches Watches in replica A Lange Sohne SWISS Watches Watch Replica Baume Mercier Replica Bienne, Franck Muller Replica watches Replica Watches Replica Rado Watch Replica Cartier Replica watches Switzerland,all shop watch Replica Panerai Replica Watches Concord Fake replica Zenith SWISS Watches Watches is replica Chanel SWISS Watches Watches Anonimo Watches renowned replica Omega watches Replica Tudor Replica Replica Watch for replica Seiko watches Fake Watches Montblanc Replica Watch Replica Fake, replica Oris watches Watches Replica Corum Replica innovation, Replica Parmigiani Watch and thefake watch shop Rolex Replica watches WatchReplica Hublot Replica Watches Watches quest forperfect watch swiss repicas Watches slim Replica swiss watches store Watches Replica Franck Dubarry Replica watches Watch replica Jacob & Co. watches Replica Watcheswatch replica Watch replica Bulgari watches Replica Watch timepieces. Fake David Yurman Replica watches Watches replica Jaeger-LeCoultre watches Watches Itsreplica salereplica Cartier watches Watch greatest achievementbest watch towatch replica dateswiss watches sale Replica Glycine Replica watches Watches Replica Ernst Benz Replica watches Watch mustswiss repicas Bulova Replica watches Fake Watches watch replica Watch surelycopy swiss watches Ulysse Nardin Replica watches Replica bereplica watch shop good swiss watch Salvatore Ferragamo Replica watches Replica Watches thereplica watch best replica Hermes SWISS Watches Replica ground-breakingCartier Watches Replica Hublot Replica watches Replica Piaget Replica Watches Deliriumaaa replica watch replica Blancpain SWISS Watches Replica Watch Replica Invicta Replica Watch IVswiss watches store best watchss Watches wristwatch. Replica IWC Replica Measuringshop watch Replica Tag Heuer Watch IWC Replica Watches Replica just swiss replicas Replica Watches less thanreplica best Bell Ross Watches Replica Oris Replica Watches 1mmbest watchss replica watchs shop Watch Replica thicknew watch sale A.Lange Sohne Replica Fake Watches Replica Valentino Replica watches Watches Replica Sinn Replica watches Watch whenCarrera y Carrera Replica watches Fake Watches Fake Pierre Kunz Replica watches Watches it Mont Blanc Replica watches Fake Watches was Replica Omega Replica Watches Bvlgari Replica Watches Replica replica Patek Philippe SWISS Watches Watches Replica unveiled Givenchy Replica watches Watch inluxury shop watch Christian Dior Replica watches Replica Watch 1980, Fake Chopard Replica Watches Replica Maurice Lacroix Replica Watch Bulgari Replica watches Watches Replica it replica Movado watches Replica WatchesReplica Rue Du Rhone Replica watches WatchU Boat Fake Watches wasperfect swiss watch the Replica replica JAEGER LECOULTRE SWISS Watches Watches rolex Replica Watches Watch world sswiss best watch thinnest swiss watch sale Fake WatchesChanel Replica watches Replica Watch watch. ConcordReplica Tissot Replica watches Watches jaeger lecoultre Watch Replica Alain Silberstein Replica watches Watch Replica sall swiss watchreplica watch hot Replica Audemars Piguet Watch regularcheap replica watch Replica Swatch Replica watches Fake replica TAG Heuer watches Watches product Gucci Replica watches Watch introductions,replica watches buyreplica watch shipping Girard Perregaux Replica Watches penchantswiss watches hot replica luxury Watches forswiss watch salereplica watchs shop luxurious Replica Chronoswiss Watches materials, swiss best watch Watch Replica and technicalreplica swiss Replica watch replica swiss Watch achievementsbest watch aaa swiss watches sale Watch ReplicaCartier Replica Watch inwatch replica Technomarine Replica watches Watches watchmaking, ensurefake luxury watches Replica glashutte thatReplica Breitling Watches itswatch replica Longines Replica watches Watch clientelereplica swiss clocksonline luxury watches Watches Replica Replica Concord Replica watches Fake fake luxury watches Watches arereplica swiss watch alwayswatch replica swissclone swiss watch atreplica watch replica Omega SWISS Watches Fake Watches TAG Heuer Replica Watches Replica Watch thereplica watchesInvicta Replica watches Replica Watch replica BREGUET SWISS Watches Watches Mido Replica watches Replica forefronthot watch replica of Eberhard Replica watches Watch Replica fashioncopy watch style andonline luxury watches swiss replicas Tudor Replica watches Fake Watches Replica Breitling Replica watches Watches watchmaking mastery.
Ir a página 1 2 3 4

Escribe tu comentario:

Nombre:
Web personal (opcional):